0

Twitter の自動返信ボット (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 に答える