急にbotが動かなくなってしまった。
自分は3つEasybotterを動かしているんだけども、そのうちの2つが動かない。これは変だ。
で、Cronの不調かと思ったけどもちゃんと動いている。
凍結かな?とも思ったが凍結していない。(過去の凍結されたときの対処方法はこちら)
で、直接botを叩くとこんなメッセージが。
Twitterへの投稿に失敗しました。
ユーザー名:@grampus_chant
object(SimpleXMLElement)#10 (1) {
["error"]=>
string(31) "Sorry, that page does not exist"
}
調べてみるとAPIのアドレスが変更になり、動かなくなっていたと判明。以前にapi変更のときに、1つだけ直してあとの2つのファイルを直しわすれていたという凡ミス(笑)。
直し方は EasyBotter 非公式wiki – 最新のAPIに変更 にも書いてあるようにアドレスを以下のように変更するだけ。
(お約束)ご利用は自己責任でお願いします
変更するのは、EasyBotter.php の一番下の方です。
赤字が新しいAPIのアドレスです。旧アドレスをコメントアウトしていますが、別に消しても構いません。
function setUpdate($value){
$url = "http://api.twitter.com/1/statuses/update.xml";
//$url = "https://twitter.com/statuses/update.xml";
return $this->_setData($url,$value);
}
function getFriendsTimeline(){
$url = "http://api.twitter.com/1/statuses/friends_timeline.xml";
//$url = "http://twitter.com/statuses/friends_timeline.xml";
return $this->_getData($url);
}
function getReplies($page = false)
{
$url = "http://api.twitter.com/1/statuses/mentions.xml";
//$url = "http://twitter.com/statuses/replies.xml";
if ($page) {
$url .= '?page=' . intval($page);
}
return $this->_getData($url);
}
function getFriends($id = null)
{
$url = "http://api.twitter.com/1/statuses/friends.xml";
//$url = "http://twitter.com/statuses/friends.xml";
return $this->_getData($url);
}
function getFollowers()
{
$url = "http://api.twitter.com/1/statuses/followers.xml";
//$url = "http://twitter.com/statuses/followers.xml";
return $this->_getData($url);
}
function followUser($screen_name)
{
$url = "http://api.twitter.com/1/friendships/create/".$screen_name.".xml";
//$url = "http://twitter.com/friendships/create/".$screen_name.".xml";
return $this->_setData($url);
}


コメント