function twitter_status_save in Twitter 6.3
Same name and namespace in other branches
- 6.5 twitter.inc \twitter_status_save()
- 6.4 twitter.inc \twitter_status_save()
- 7.6 twitter.inc \twitter_status_save()
- 7.3 twitter.inc \twitter_status_save()
- 7.4 twitter.inc \twitter_status_save()
- 7.5 twitter.inc \twitter_status_save()
Saves a TwitterStatus object to {twitter}
1 call to twitter_status_save()
- twitter_fetch_user_timeline in ./
twitter.inc - Fetches a user's timeline
File
- ./
twitter.inc, line 61
Code
function twitter_status_save($status) {
$status->twitter_id = $status->id;
$status->screen_name = $status->user->screen_name;
$status->created_time = strtotime($status->created_at);
if (db_result(db_query("SELECT 1 FROM {twitter} WHERE twitter_id = %s", $status->id))) {
drupal_write_record('twitter', $status, array(
'twitter_id',
));
}
else {
drupal_write_record('twitter', $status);
}
// Let other modules know that an status has been just saved.
module_invoke_all('twitter_status_save', $status);
}