Skip to content

Instantly share code, notes, and snippets.

@shobotch
Created May 20, 2012 07:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shobotch/2757150 to your computer and use it in GitHub Desktop.
Save shobotch/2757150 to your computer and use it in GitHub Desktop.
連続ふぁぼ(シングルコア)
<?php
$user[]= new ktaiWebLibrary("Twitter ID","Password");
$user[]= new ktaiWebLibrary("Twitter ID2","Password");
// and more...
$fav = 1; //ふぁぼをする場合1
$rt = 0; //RTをする場合1
/*
twitterのAPIで "http://api.twitter.com/1/statuses/user_timeline.json"
から引数で "trim_user"=>1 とした配列を$friends_timelineに渡してあげれば幸せになります。
*/
shuffle($friends_timeline); //配列をシャッフルしていますが、きまぐれで。使わなかったらコメントアウト推奨
foreach($friends_timeline as $value) {
foreach ($user as $users) {
if($fav){
$users->favorite($value["user"]["id"], $value["id_str"]);
}
if($rt){
$users->reTweet($value["user"]["id"], $value["id_str"]);
}
}
}
//ktaiwebのライブラリは俺の他のgistにぶちこんどくからそれの最新版を参照
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment