Thank you Abraham for your swift reply! This is the code I use now:
$status = $connection->post('statuses/update', array('status' => 'mmmdedju')); $status->id; echo $status; I get error Catchable fatal error: Object of class stdClass could not be converted to string in /home/polskaya/public_html/140karakters/ twitterapi/test.php on line 23 Line 23 is echo $status; What am I overlooking? On 22 sep, 23:16, Abraham Williams <4bra...@gmail.com> wrote: > $status = $connection->post('statuses/update', array('status' => 'text to > post')); > > $status->id; > > Abraham > ------------- > Abraham Williams | Hacker Advocate |http://abrah.am > @abraham |http://projects.abrah.am|http://blog.abrah.am > This email is: [ ] shareable [x] ask first [ ] private. > > On Wed, Sep 22, 2010 at 13:58, Polskaya <polsk...@gmail.com> wrote: > > Hi all, > > I got a bit stuck I'm afraid. > > I have a single user application. Using the code below, I can post a > > status update. However, I would like to receive the id of that last > > update. > > > include('oAuth/twitteroauth.php'); > > define("CONSUMER_KEY", "***"); > > define("CONSUMER_SECRET", "***"); > > define("OAUTH_TOKEN", "***"); > > define("OAUTH_SECRET", "***"); > > $connection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, > > OAUTH_TOKEN, OAUTH_SECRET); > > $content = $connection->get('account/verify_credentials'); > > $connection->post('statuses/update', array('status' => 'text to > > post')); > > > Anyone with a clue? Thx in advance! :) > > > -- > > 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?hl=en -- 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?hl=en