0

当我运行 twitter autoreply bot (https://gist.github.com/820281) 时出现此错误

Fatal error: Uncaught exception 'OAuthException' with message 'Invalid auth/bad request   (got a 404, expected HTTP/1.1 20X or a redirect)' in /home/.../public_html    /twitterautoreply.php:82 Stack trace: #0 /home/.../public_html/twitterautoreply.php(82): OAuth->fetch('https://twitter...', Array, 'POST') #1 /home/.../public_html/twitterautoreply.php(68):TwitterAutoReply->sendReply(Object(stdClass), 'check out this ...') #2 /home/.../public_html/run.php(13): TwitterAutoReply->run() #3 {main} thrown in /home/.../public_html/twitterautoreply.php on line 82

我已经检查了授权密钥和秘密,但不是这样。

4

1 回答 1

0

不确定是否相关,本周 Twitter API 团队删除了 API 的“版本零”。没有任何版本的 URL 会出现 404 错误。

查看 github 上的 TwitterAutoReply 类:

const UPDATE_URL = 'https://twitter.com/statuses/update.json';

在 API 文档(版本 1)上使用状态/更新:

http://api.twitter.com/1/statuses/update.format
于 2012-10-11T17:57:41.533 回答