Skip to content

Instantly share code, notes, and snippets.

@wktk
Created March 3, 2012 10:18
Show Gist options
  • Save wktk/1965392 to your computer and use it in GitHub Desktop.
Save wktk/1965392 to your computer and use it in GitHub Desktop.
EasyBotter で TL 上のツイートをふぁぼ
<?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