使用PHP进行TwitterOAuth
composer.json 文件
"require": {
"mpyw/twistoauth": "@dev"
}
$twitter = new TwistOAuth(
$consumerKey,
$consumerSecret,
$accessToken,
$accessTokenSecret
);
$result = $twitter->post("statuses/update", ['status' => $comment]);
echo $result->id_str.PHP_EOL;