「最新のAPIに変更」の編集履歴(バックアップ)一覧はこちら

最新のAPIに変更」(2012/03/07 (水) 20:14:21) の最新版変更点

追加された行は緑色になります。

削除された行は赤色になります。

*最新APIへの変更 Twitter側の仕様変更がありましたので、EasyBotterで使用しているTwitter APIを最新のものに変更しなければなりません。 以下の解説は&bold(){2011年8月12日現在の情報}です。 **APIとは? APIとは「Application Program Interface」または「Application Programming Interface」のことです。  参考:[[Wikipedia:アプリケーションプログラミングインタフェース>http://ja.wikipedia.org/wiki/%E3%82%A2%E3%83%97%E3%83%AA%E3%82%B1%E3%83%BC%E3%82%B7%E3%83%A7%E3%83%B3%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%9F%E3%83%B3%E3%82%B0%E3%82%A4%E3%83%B3%E3%82%BF%E3%83%95%E3%82%A7%E3%83%BC%E3%82%B9]] EasyBotterではリプライやタイムラインの取得、フォロー・フォロワーのIDや名前を取得、などの際にTwitterAPIを使用しています。 古いTwitter APIを使用し続けていると、挙動がおかしくなったり、全く機能しなくなるおそれがありまです。 今後もTwitter側の仕様変更などでAPIが変更になる場合があるかも知れませんので、公式情報を定期的に確認しましょう。 **API更新方法 方法1または方法2のどちらかで更新を行ってください。 ***方法1 (手動) &bold(){EasyBotter.php}を、下記の通り書き変えていきます。 エディタの検索機能を使うなどして漏れなく変更してください。 また、コピー&ペーストの際に余計な文字(スペース等)が入ったり、必要な部分を消し過ぎたりしないよう注意しましょう。 変更箇所は、EasyBotter.phpの下部にまとまっています。 https://twitter.com/statuses/update.xml ↓ http://api.twitter.com/1/statuses/update.xml http://twitter.com/statuses/friends_timeline.xml ↓ http://api.twitter.com/1/statuses/friends_timeline.xml http://twitter.com/statuses/replies.xml ↓ http://api.twitter.com/1/statuses/mentions.xml http://twitter.com/statuses/friends.xml ↓ http://api.twitter.com/1/statuses/friends.xml http://twitter.com/statuses/followers.xml ↓ http://api.twitter.com/1/statuses/followers.xml http://twitter.com/friendships/create/id.xml ←EasyBotter.php では、"http://twitter.com/friendships/create/".$screen_name.".xml"; となっているので、 ↓ http://api.twitter.com/1/friendships/create/id.xml ← "http://api.twitter.com/1/friendships/create/".$screen_name.".xml"; と書き換えてください。 ***方法2 (自動) (手動で変更した場合はこちらを利用する必要はありません) &color(red){EasyBotter.php のパーミッションを 666 に変更してから}、 次のスクリプトを replace.php など適当な名前で&color(red){EasyBotter.phpと同じディレクトリに}アップロードして、 ブラウザから実行してください。 またはbot.phpの中に<?php ~~ ?>の~~の部分を貼り付けて、bot.phpから実行してもかまいません。bot.phpから実行する場合、書き換えに成功したら、このコードは削除してください。 <?php $target = "EasyBotter.php"; file_put_contents($target,str_replace('replies.xml','mentions.xml',preg_replace("/ps?:\/\/twitter.com\/([a-z\/_]+)/","p://api.twitter.com/1/$1",file_get_contents($target)))); ?> .
*最新APIへの変更 Twitter側の仕様変更がありましたので、EasyBotterで使用しているTwitter APIを最新のものに変更しなければなりません。 以下の解説は&bold(){2011年8月12日現在の情報}です。 **APIとは? APIとは「Application Program Interface」または「Application Programming Interface」のことです。  参考:[[Wikipedia:アプリケーションプログラミングインタフェース>http://ja.wikipedia.org/wiki/%E3%82%A2%E3%83%97%E3%83%AA%E3%82%B1%E3%83%BC%E3%82%B7%E3%83%A7%E3%83%B3%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%9F%E3%83%B3%E3%82%B0%E3%82%A4%E3%83%B3%E3%82%BF%E3%83%95%E3%82%A7%E3%83%BC%E3%82%B9]] EasyBotterではリプライやタイムラインの取得、フォロー・フォロワーのIDや名前を取得、などの際にTwitterAPIを使用しています。 古いTwitter APIを使用し続けていると、挙動がおかしくなったり、全く機能しなくなるおそれがありまです。 今後もTwitter側の仕様変更などでAPIが変更になる場合があるかも知れませんので、公式情報を定期的に確認しましょう。 **API更新方法 &bold(){EasyBotter.php のパーミッションを 666 に変更してから}、 次のスクリプトを replace.php など適当な名前で&color(red){EasyBotter.phpと同じディレクトリに}アップロードして、 ブラウザなどから実行してください。 またはbot.phpの中に<?php ~~ ?>の~~の部分を貼り付けて、bot.phpから実行してもかまいません。 ただしbot.phpから実行する場合、書き換え処理が終了したら、このコードは削除してください。 自動で更新するのが不安な場合は、下記の表に従って手動で書き換えても大丈夫です。 <?php $target = "EasyBotter.php"; echo file_put_contents($target,str_replace('replies.xml','mentions.xml', preg_replace("/ps?:\/\/twitter.com\/([a-z\/_]+)/","p://api.twitter.com/1/$1", file_get_contents($target))))?"多分完了しました。確認して下さい":"失敗しました"; ?> EasyBotter.php の下部にまとまっている API 群が、下記の通り書き換わったかを漏れ無く確認して下さい。 コピー&ペーストの際に余計な文字(スペース等)が入ったり、必要な部分を消したりしないよう注意しましょう。 https://twitter.com/statuses/update.xml ↓ http://api.twitter.com/1/statuses/update.xml http://twitter.com/statuses/friends_timeline.xml ↓ http://api.twitter.com/1/statuses/friends_timeline.xml http://twitter.com/statuses/replies.xml ↓ http://api.twitter.com/1/statuses/mentions.xml http://twitter.com/statuses/friends.xml ↓ http://api.twitter.com/1/statuses/friends.xml http://twitter.com/statuses/followers.xml ↓ http://api.twitter.com/1/statuses/followers.xml http://twitter.com/friendships/create/".$screen_name.".xml ↓ http://api.twitter.com/1/friendships/create/".$screen_name.".xml

表示オプション

横に並べて表示:
変化行の前後のみ表示:
目安箱バナー