You are here

function twitter_fetch_mentions_timeline in Twitter 7.4

Same name and namespace in other branches
  1. 6.5 twitter.inc \twitter_fetch_mentions_timeline()
  2. 7.6 twitter.inc \twitter_fetch_mentions_timeline()
  3. 7.5 twitter.inc \twitter_fetch_mentions_timeline()

Fetches user's mentions.

1 call to twitter_fetch_mentions_timeline()
twitter_cron in ./twitter.module
Implements hook_cron().

File

./twitter.inc, line 156

Code

function twitter_fetch_mentions_timeline($id) {
  $account = twitter_account_load($id);
  $twitter = twitter_connect($account);
  $params = array();
  $statuses = $twitter
    ->mentions_timeline($params);
  foreach ($statuses as $status) {
    if (!twitter_account_load($status->user->id)) {
      twitter_account_save($status->user);
    }
    twitter_status_save($status);
  }
}