PHP?twitterAPI????????????????????

PHP?twitterAPI???????????????????????
????????1???????????????

?????????REST

GET statuses/show/:id

Twitter Developer Documentation

?????

id?????
?????????,?????

??????

//twitteroauth.php???????????????????????????????
require “twitteroauth/autoload.php”;
use Abraham\TwitterOAuth\TwitterOAuth;

//Consumer key?????
$sConsumerKey = “XXXXXXXXXXXXXXXXXXXXXXXXXX”;
//Consumer secret?????
$sConsumerSecret = “XXXXXXXXXXXXXXXXXXXXXXXXXX”;
//Access Token?????
$sAccessToken = “XXXXXXXXXXXXXXXXXXXXXXXXXX”;
//Access Token Secret?????
$sAccessTokenSecret = “XXXXXXXXXXXXXXXXXXXXXXXXXX”;

$to = new TwitterOAuth($sConsumerKey,$sConsumerSecret,$sAccessToken,$sAccessTokenSecret);

$Req = $to->get(‘statuses/show’, array(“id” => “XXXXXXXXXXX”));

??????????????????????json???????????