Re: [twitter-dev] Adding twitter message
Thanks every one - correcting the clock on the server worked. - Original Message - From: Knutsford Software i...@knutsford-software.co.uk To: twitter-development-talk@googlegroups.com Sent: Tuesday, October 05, 2010 3:40 PM Subject: Re: [twitter-dev] Adding twitter message Stupid me - of course it doesn't. The server's clock appears to be way out. Thanks - Original Message - From: Tom van der Woerdt i...@tvdw.eu To: twitter-development-talk@googlegroups.com Sent: Tuesday, October 05, 2010 3:07 PM Subject: Re: [twitter-dev] Adding twitter message If you simply use time() then you'll get the correct timestamp, assuming that the server's clock is correct. Timezones do not influence time(). Tom On 10/5/10 3:29 PM, Knutsford Software wrote: PHP has now been upgraded to 5.2 on the server but it is now failing with Invalid / used nonce I gather that is due to the timezone not being liked. The site is being hosted in the UK so what do I do about the timezone so that twitter is happy pleas? so that Twitter is happy? Thanks -- Twitter developer documentation and resources: http://dev.twitter.com/doc API updates via Twitter: http://twitter.com/twitterapi Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list Change your membership to this group: http://groups.google.com/group/twitter-development-talk -- Twitter developer documentation and resources: http://dev.twitter.com/doc API updates via Twitter: http://twitter.com/twitterapi Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list Change your membership to this group: http://groups.google.com/group/twitter-development-talk -- Twitter developer documentation and resources: http://dev.twitter.com/doc API updates via Twitter: http://twitter.com/twitterapi Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list Change your membership to this group: http://groups.google.com/group/twitter-development-talk -- Twitter developer documentation and resources: http://dev.twitter.com/doc API updates via Twitter: http://twitter.com/twitterapi Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list Change your membership to this group: http://groups.google.com/group/twitter-development-talk
Re: [twitter-dev] Adding twitter message
PHP has now been upgraded to 5.2 on the server but it is now failing with Invalid / used nonceI gather that is due to the timezone not being liked. The site is being hosted in the UK so what do I do about the timezone so that twitter is happy pleas?so that Twitter is happy?Thanks -- Twitter developer documentation and resources: http://dev.twitter.com/doc API updates via Twitter: http://twitter.com/twitterapi Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list Change your membership to this group: http://groups.google.com/group/twitter-development-talk
Re: [twitter-dev] Adding twitter message
If you simply use time() then you'll get the correct timestamp, assuming that the server's clock is correct. Timezones do not influence time(). Tom On 10/5/10 3:29 PM, Knutsford Software wrote: PHP has now been upgraded to 5.2 on the server but it is now failing with Invalid / used nonce I gather that is due to the timezone not being liked. The site is being hosted in the UK so what do I do about the timezone so that twitter is happy pleas? so that Twitter is happy? Thanks -- Twitter developer documentation and resources: http://dev.twitter.com/doc API updates via Twitter: http://twitter.com/twitterapi Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list Change your membership to this group: http://groups.google.com/group/twitter-development-talk -- Twitter developer documentation and resources: http://dev.twitter.com/doc API updates via Twitter: http://twitter.com/twitterapi Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list Change your membership to this group: http://groups.google.com/group/twitter-development-talk
Re: [twitter-dev] Adding twitter message
Stupid me - of course it doesn't. The server's clock appears to be way out. Thanks - Original Message - From: Tom van der Woerdt i...@tvdw.eu To: twitter-development-talk@googlegroups.com Sent: Tuesday, October 05, 2010 3:07 PM Subject: Re: [twitter-dev] Adding twitter message If you simply use time() then you'll get the correct timestamp, assuming that the server's clock is correct. Timezones do not influence time(). Tom On 10/5/10 3:29 PM, Knutsford Software wrote: PHP has now been upgraded to 5.2 on the server but it is now failing with Invalid / used nonce I gather that is due to the timezone not being liked. The site is being hosted in the UK so what do I do about the timezone so that twitter is happy pleas? so that Twitter is happy? Thanks -- Twitter developer documentation and resources: http://dev.twitter.com/doc API updates via Twitter: http://twitter.com/twitterapi Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list Change your membership to this group: http://groups.google.com/group/twitter-development-talk -- Twitter developer documentation and resources: http://dev.twitter.com/doc API updates via Twitter: http://twitter.com/twitterapi Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list Change your membership to this group: http://groups.google.com/group/twitter-development-talk -- Twitter developer documentation and resources: http://dev.twitter.com/doc API updates via Twitter: http://twitter.com/twitterapi Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list Change your membership to this group: http://groups.google.com/group/twitter-development-talk
Re: [twitter-dev] Adding twitter message
Thanks I will try changing $twitterObj = new EpiTwitter($consumer_key, $consumer_secret); I will also try and turn php errors on. I tried last week but it didn't do anything Pam - Original Message - From: Scott Wilcox sc...@dor.ky To: twitter-development-talk@googlegroups.com Sent: Sunday, October 03, 2010 9:59 PM Subject: Re: [twitter-dev] Adding twitter message er, off. Also: $twitterObj = new EpiTwitter($consumer_key, $consumer_secret); You are only providing consumer keys, you need to provider user keys too (probably the ones under 'My Access Token'). Scott. On 3 Oct 2010, at 08:01, plw wrote: At the top of my page I have include 'lib/EpiCurl.php'; include 'lib/EpiOAuth.php'; include 'lib/EpiTwitter.php'; include 'lib/secret.php'; further down I have $twitter_message = Offers update - . date(g:i a:) . http://www.pub-rooms.co.uk/ask-rooms.php?bookrooms=; . $intid . - . $ItemName . . $CTown; $twitterObj = new EpiTwitter($consumer_key, $consumer_secret); $twitterObj-setToken($oauth_token, $oauth_token_secret); $update_status = $twitterObj-post_statusesUpdate(array('status' = $twitter_message)); My problem that it doesn't send anything to twitter and it doesn't like $tmp=$update_status-response; php errors are turned off so I don't know why it doesn't like $tmp=$update_status-response; What am I doing wrong. At the moment I am totaly stuck. Am I right in thinking that you can't send a message directly to twiiter anymore from the admin of a website now that you have to use OAUTH? -- Twitter developer documentation and resources: http://dev.twitter.com/doc API updates via Twitter: http://twitter.com/twitterapi Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list Change your membership to this group: http://groups.google.com/group/twitter-development-talk -- Twitter developer documentation and resources: http://dev.twitter.com/doc API updates via Twitter: http://twitter.com/twitterapi Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list Change your membership to this group: http://groups.google.com/group/twitter-development-talk
Re: [twitter-dev] Adding twitter message
I am using PHP Version 5.1.6 and I now get the following Fatal error: Call to undefined function json_decode() in /var/www/vhosts/pub-rooms.co.uk/httpdocs/updates/company/lib/EpiTwitter.php on line 41 So it looks as though json isn't installed on the server. Thanks I will get the site owner to talk to the Host and see what they say Pam -- Twitter developer documentation and resources: http://dev.twitter.com/doc API updates via Twitter: http://twitter.com/twitterapi Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list Change your membership to this group: http://groups.google.com/group/twitter-development-talk
Re: [twitter-dev] Adding twitter message
Hi Pam, Like you I've only recently started using the Twitter API, but it seems pretty straight-forward, and it can be run from a local server. In my case I'm using the OAuth authentication to send tweets from a website. If you are having issues turning on the PHP errors for the entire server, you could just embed the following in your script: ?php ini_set('display_errors', 1); error_reporting(E_ALL); ? This will override the default settings for specific script being tested, so won't affect the rest of the site. I hope this helps. Regards, Ross t On 4 October 2010 08:42, Knutsford Software i...@knutsford-software.co.uk wrote: Thanks I will try changing $twitterObj = new EpiTwitter($consumer_key, $consumer_secret); I will also try and turn php errors on. I tried last week but it didn't do anything Pam - Original Message - From: Scott Wilcox sc...@dor.ky To: twitter-development-talk@googlegroups.com Sent: Sunday, October 03, 2010 9:59 PM Subject: Re: [twitter-dev] Adding twitter message er, off. Also: $twitterObj = new EpiTwitter($consumer_key, $consumer_secret); You are only providing consumer keys, you need to provider user keys too (probably the ones under 'My Access Token'). Scott. On 3 Oct 2010, at 08:01, plw wrote: At the top of my page I have include 'lib/EpiCurl.php'; include 'lib/EpiOAuth.php'; include 'lib/EpiTwitter.php'; include 'lib/secret.php'; further down I have $twitter_message = Offers update - . date(g:i a:) . http://www.pub-rooms.co.uk/ask-rooms.php?bookrooms=; . $intid . - . $ItemName . . $CTown; $twitterObj = new EpiTwitter($consumer_key, $consumer_secret); $twitterObj-setToken($oauth_token, $oauth_token_secret); $update_status = $twitterObj-post_statusesUpdate(array('status' = $twitter_message)); My problem that it doesn't send anything to twitter and it doesn't like $tmp=$update_status-response; php errors are turned off so I don't know why it doesn't like $tmp=$update_status-response; What am I doing wrong. At the moment I am totaly stuck. Am I right in thinking that you can't send a message directly to twiiter anymore from the admin of a website now that you have to use OAUTH? -- Twitter developer documentation and resources: http://dev.twitter.com/doc API updates via Twitter: http://twitter.com/twitterapi Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list Change your membership to this group: http://groups.google.com/group/twitter-development-talk -- Twitter developer documentation and resources: http://dev.twitter.com/doc API updates via Twitter: http://twitter.com/twitterapi Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list Change your membership to this group: http://groups.google.com/group/twitter-development-talk -- Twitter developer documentation and resources: http://dev.twitter.com/doc API updates via Twitter: http://twitter.com/twitterapi Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list Change your membership to this group: http://groups.google.com/group/twitter-development-talk
Re: [twitter-dev] Adding twitter message
Just incase it helps, here is a work around for older versions of php: http://my.php.net/manual/en/function.json-decode.php#80606 Hope that helps. On 4 October 2010 09:43, Knutsford Software i...@knutsford-software.co.uk wrote: I am using PHP Version 5.1.6 and I now get the following Fatal error: Call to undefined function json_decode() in /var/www/vhosts/pub-rooms.co.uk/httpdocs/updates/company/lib/EpiTwitter.php on line 41 So it looks as though json isn't installed on the server. Thanks I will get the site owner to talk to the Host and see what they say Pam -- Twitter developer documentation and resources: http://dev.twitter.com/doc API updates via Twitter: http://twitter.com/twitterapi Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list Change your membership to this group: http://groups.google.com/group/twitter-development-talk -- Twitter developer documentation and resources: http://dev.twitter.com/doc API updates via Twitter: http://twitter.com/twitterapi Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list Change your membership to this group: http://groups.google.com/group/twitter-development-talk
Re: [twitter-dev] Adding twitter message
Thanks. That looks just the job Pam -- Twitter developer documentation and resources: http://dev.twitter.com/doc API updates via Twitter: http://twitter.com/twitterapi Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list Change your membership to this group: http://groups.google.com/group/twitter-development-talk
[twitter-dev] Adding twitter message
At the top of my page I have include 'lib/EpiCurl.php'; include 'lib/EpiOAuth.php'; include 'lib/EpiTwitter.php'; include 'lib/secret.php'; further down I have $twitter_message = Offers update - . date(g:i a:) . http://www.pub-rooms.co.uk/ask-rooms.php?bookrooms=; . $intid . - . $ItemName . . $CTown; $twitterObj = new EpiTwitter($consumer_key, $consumer_secret); $twitterObj-setToken($oauth_token, $oauth_token_secret); $update_status = $twitterObj-post_statusesUpdate(array('status' = $twitter_message)); My problem that it doesn't send anything to twitter and it doesn't like $tmp=$update_status-response; php errors are turned off so I don't know why it doesn't like $tmp=$update_status-response; What am I doing wrong. At the moment I am totaly stuck. Am I right in thinking that you can't send a message directly to twiiter anymore from the admin of a website now that you have to use OAUTH? Thanks -- Twitter developer documentation and resources: http://dev.twitter.com/doc API updates via Twitter: http://twitter.com/twitterapi Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list Change your membership to this group: http://groups.google.com/group/twitter-development-talk
Re: [twitter-dev] Adding twitter message
First of all, turn PHP errors on and then try. How do you expect to track down an error with error reporting on? On 3 Oct 2010, at 08:01, plw wrote: At the top of my page I have include 'lib/EpiCurl.php'; include 'lib/EpiOAuth.php'; include 'lib/EpiTwitter.php'; include 'lib/secret.php'; further down I have $twitter_message = Offers update - . date(g:i a:) . http://www.pub-rooms.co.uk/ask-rooms.php?bookrooms=; . $intid . - . $ItemName . . $CTown; $twitterObj = new EpiTwitter($consumer_key, $consumer_secret); $twitterObj-setToken($oauth_token, $oauth_token_secret); $update_status = $twitterObj-post_statusesUpdate(array('status' = $twitter_message)); My problem that it doesn't send anything to twitter and it doesn't like $tmp=$update_status-response; php errors are turned off so I don't know why it doesn't like $tmp=$update_status-response; What am I doing wrong. At the moment I am totaly stuck. Am I right in thinking that you can't send a message directly to twiiter anymore from the admin of a website now that you have to use OAUTH? -- Twitter developer documentation and resources: http://dev.twitter.com/doc API updates via Twitter: http://twitter.com/twitterapi Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list Change your membership to this group: http://groups.google.com/group/twitter-development-talk
Re: [twitter-dev] Adding twitter message
er, off. Also: $twitterObj = new EpiTwitter($consumer_key, $consumer_secret); You are only providing consumer keys, you need to provider user keys too (probably the ones under 'My Access Token'). Scott. On 3 Oct 2010, at 08:01, plw wrote: At the top of my page I have include 'lib/EpiCurl.php'; include 'lib/EpiOAuth.php'; include 'lib/EpiTwitter.php'; include 'lib/secret.php'; further down I have $twitter_message = Offers update - . date(g:i a:) . http://www.pub-rooms.co.uk/ask-rooms.php?bookrooms=; . $intid . - . $ItemName . . $CTown; $twitterObj = new EpiTwitter($consumer_key, $consumer_secret); $twitterObj-setToken($oauth_token, $oauth_token_secret); $update_status = $twitterObj-post_statusesUpdate(array('status' = $twitter_message)); My problem that it doesn't send anything to twitter and it doesn't like $tmp=$update_status-response; php errors are turned off so I don't know why it doesn't like $tmp=$update_status-response; What am I doing wrong. At the moment I am totaly stuck. Am I right in thinking that you can't send a message directly to twiiter anymore from the admin of a website now that you have to use OAUTH? -- Twitter developer documentation and resources: http://dev.twitter.com/doc API updates via Twitter: http://twitter.com/twitterapi Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list Change your membership to this group: http://groups.google.com/group/twitter-development-talk