开发者

PHP - Check twitter response and error code

开发者 https://www.devze.com 2023-03-20 11:21 出处:网络
Im using the TwitterOauth library to post to Twitter (https://github.com/abraham/twitteroauth) Im using the following line to post:

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

精彩评论

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