“Could not authenticate you.” -error when using Twitter OAuth

安稳与你 提交于 2019-12-02 02:07:43

The Snipe.net tutorial is for an older version of TwitterOAuth. Make sure you read the new documentation

http://github.com/abraham/twitteroauth/blob/master/DOCUMENTATION

In general updating to the new version is changing:

$content = $to->OAuthRequest('https://twitter.com/account/verify_credentials.xml', array(), 'GET');

to:

$content = $to->get('account/verify_credentials');

I was having the same error, caused by a simple mistake:

Doesn’t work: $this->twitteroauth->post('statuses/update’, $message);

Works: $this->twitteroauth->post('statuses/update', array("status" => $message));

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!