2017-02-25 62 views
1

分享Tweet如何喜歡我使用Abrahm庫https://github.com/abraham/twitteroauth使用Twitter API

我可以發佈,也轉推,但嘗試喜愛

$fav_tweets=$connection->post("favorites/create/id=835432351400357888"); 

$fav_tweets=$connection->post("favorites/create.json?id=835432351400357888"); 

驗證碼
$fav_tweets=$connection->post("favorites/create/835432351400357888"); 

但是,沒有代碼的工作,他們返回結果:

stdClass Object ([errors] => Array ([0] => stdClass Object ([code] => 32 [message] => Could not authenticate you.))) 

請幫助球員提前

回答

1

https://twitteroauth.com/所示的例子 感謝,嘗試:

$statues = $connection->post("favorites/create", ["id" => "835432351400357888"]); 
+0

感謝,它的工作 –