I would recommend strengthening your error handling code here so that you are able to pivot and debug on the particular error occurring. If you sweep all possible errors under a single rug, you lose visibility on the actual reason for the error. While not every Twitter API error message is helpful, they all provide a clue on what might be going wrong.
Has anything else about your environment changed? Is the system clock on the machine executing this out of sync with the times on our servers? If you run the same code from another location, do you still have the same problem? Are there any issues with the account or application you are using to post with? (suspended, etc.) Taylor On Mon, Nov 1, 2010 at 9:21 AM, plw <[email protected]> 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'; > > > My code for sending to twitter is > > > > $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, > $oauth_token, $oauth_token_secret); > $twitter_message = utf8_encode($twitter_message); > > $x = $twitterObj->post_statusesUpdate(array('status' => > $twitter_message)); > print_r($twitterObj->post_statusesUpdate(array('status' => > $twitter_message))); > if ($x->id) { > > } else { > echo "Error Posting Tweet\n"; > die(); > } > > > > > Instead of posting to twitter I get Error Posting Tweet being echoed > > > > > print_r($twitterObj->post_statusesUpdate(array('status' => > $twitter_message))); returns > > > > EpiTwitterJson Object ( [resp:private] => EpiCurlManager Object > ( [key:private] => Resource id #20 [epiCurl:private] => EpiCurl Object > ( [mc:private] => Resource id #18 [msgs:private] => [running:private] > => [requests:private] => Array ( [Resource id #19] => Resource id #19 > [Resource id #20] => Resource id #20 ) [responses:private] => Array > ( ) [properties:private] => Array ( [code] => 2097154 [time] => > 3145731 [length] => 3145743 [type] => 1048594 ) ) ) ) > > > from phpinfo() I get > > PHP Version 5.2.14 > > System Linux mail.hificollective.co.uk 2.6.18-194.8.1.el5 #1 SMP Thu > Jul 1 19:04:48 EDT 2010 x86_64 > Build Date Aug 12 2010 16:04:36 > Configure Command './configure' '--build=x86_64-redhat-linux-gnu' '-- > host=x86_64-redhat-linux-gnu' '--target=x86_64-redhat-linux-gnu' '-- > program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/ > bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' > '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/ > libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/ > usr/share/man' '--infodir=/usr/share/info' '--cache-file=../ > config.cache' '--with-libdir=lib64' '--with-config-file-path=/etc' '-- > with-config-file-scan-dir=/etc/php.d' '--disable-debug' '--with-pic' > '--disable-rpath' '--without-pear' '--with-bz2' '--with-exec-dir=/usr/ > bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--with-xpm-dir=/ > usr' '--enable-gd-native-ttf' '--with-t1lib=/usr' '--without-gdbm' '-- > with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '-- > with-openssl' '--with-pcre-regex' '--with-zlib' '--with-layout=GNU' '-- > enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' > '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--with- > kerberos' '--enable-ucd-snmp-hack' '--enable-shmop' '--enable- > calendar' '--without-mime-magic' '--without-sqlite' '--with-libxml- > dir=/usr' '--with-xml' '--with-system-tzdata' '--with-apxs2=/usr/sbin/ > apxs' '--without-mysql' '--without-gd' '--disable-dom' '--disable-dba' > '--without-unixODBC' '--disable-pdo' '--disable-xmlreader' '--disable- > xmlwriter' '--disable-json' '--without-pspell' '--disable-wddx' '-- > without-curl' '--disable-posix' '--disable-sysvmsg' '--disable- > sysvshm' '--disable-sysvsem' > > > > It used to work adn I ahve no idea why it has now stopped so can > someone please point me in the right direction - 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
