Twitter oAuth Tweet Updates - Confirmation

Discussion in 'PHP' started by krishmk, Nov 20, 2010.

  1. #1
    I am using Abraham's Twitter oAuth library to update Tweets.
    It works just fine.
    However I am curious how to grab the http code and xml string returned by Twitter for error checking. I tried to echo the "$response" variable but dont see any output in browser even after the tweet was successfully posted to the account.
     
    krishmk, Nov 20, 2010 IP
  2. Abraham Williams

    Abraham Williams Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    1
    Trophy Points:
    0
    #2
    Assuming you are using the following to post the new tweet.
    $response = $connection->post('statuses/update', array('status' => 'text to tweet'));
    $response will contain an object of the newly created status. and $connection->http_code will return the HTTP code for the most recent call to Twitter.
     
    Abraham Williams, Nov 29, 2010 IP
  3. backlinkneeded

    backlinkneeded Member

    Messages:
    285
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    26
    #3
    good info. thanks again
     
    backlinkneeded, Dec 22, 2010 IP