开发者

PHP - Check twitter response and error code

Im using the TwitterOauth library to post to Twitter (https://github.com/abraham/twitteroauth)

Im using the following line to post:

$oauth->post('sta开发者_运维百科tuses/update', array("status" => $message));

How can I fetch the reponse that comes back from twitter using PHP, I want to check the response has a 200 server message indicating a successful post.

Any ideas?


 $serverResponse = $oauth->post('statuses/update', array("status" => $message));
 print_r($serverResponse);

fairly certain you'll get some good info outta there...!


$response = $oauth->post('statuses/update', array("status" => $message));

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜