我正在使用Abrahm图书馆https://github.com/abraham/twitteroauth
我可以发布并转发,但尝试使用此代码进行收藏
$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. ) ) )
请帮助伙计们 提前谢谢
答案 0 :(得分:1)
从https://twitteroauth.com/显示的示例中,尝试:
$statues = $connection->post("favorites/create", ["id" => "835432351400357888"]);