function twitter_cache_status in Twitter 6.2
Saves Twitter status message to the database.
If the $silent parameter is set to TRUE, this function will also notify other modules via hook_twitter_status_update() that a new stauts has been retrieved and saved. This is normally set to FALSE, but may be useful when integrating Twitter into complex workflows.
Parameters
$status: A Twitter status updated in array form.
$silent: A boolean indicating whether hook_twitter_status_update should be fired.
See also
2 calls to twitter_cache_status()
- twitter_fetch_statuses in ./
twitter.inc - Fetch the latest statuses for a Twitter.com account, regardless of privacy.
- twitter_fetch_timeline in ./
twitter.inc - Fetch the public timeline for a Twitter.com account.
File
- ./
twitter.inc, line 419 - A wrapper API for the Twitter microblogging service.
Code
function twitter_cache_status($status = array(), $silent = FALSE) {
db_query("DELETE FROM {twitter} WHERE twitter_id = %n", $status['twitter_id']);
drupal_write_record('twitter', $status);
if (!$silent) {
module_invoke_all('twitter_status_update', $status);
}
}