Created
May 20, 2012 07:08
-
-
Save shobotch/2757150 to your computer and use it in GitHub Desktop.
連続ふぁぼ(シングルコア)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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