自分のツイートをAPI1.1経由で取得してファイルに出力する
自分のツイートをAPI経由で取得してファイルに出力するサンプルです。twitteroauth.phpを使っています。
[php]OAuthRequest(“https://api.twitter.com/1.1/statuses/user_timeline.json”,’GET’,array(‘count’=>’10’));$result = json_decode($req);
$tweet = “
- “;
- $object->text OAuthRequest(“https://api.twitter.com/1.1/statuses/update.json”,”POST”,array(“status”=>/”$message”));
$result = json_decode($req);
}
header(‘Location: https://www.geek.sc/b/’);
exit;
?>[/php]
for($i=0;$i>5;$i++){
$object = $result[$i];
$tweet .= “