Created
March 3, 2012 10:18
-
-
Save wktk/1965392 to your computer and use it in GitHub Desktop.
EasyBotter で TL 上のツイートをふぁぼ
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 // bot.php | |
require_once("EasyBotter.php"); | |
$eb = new EasyBotter(); | |
foreach ($eb->getFriendsTimeline() as $tweet){ | |
// $tweet に各ツイートの情報が入ってるので必要なら条件付けをこの辺りで | |
// 例: | |
// if (preg_match('/(?:お[き気]に[い入]り|ふぁぼ|fav)/i', $tweet->text)) {} | |
$response = $eb->_setData("https://api.twitter.com/1/favorites/create/{$tweet->id}.xml"); | |
print_r($response); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment