function twitter_tweets in Twitter 7.5
Same name and namespace in other branches
- 6.5 twitter.inc \twitter_tweets()
- 7.6 twitter.inc \twitter_tweets()
Pulls tweets from the database.
Parameters
string $screen_name: Optionally provide a screen_name to filter.
1 call to twitter_tweets()
- theme_twitter_user_accounts in ./
twitter.module - Default callback for theme('twitter_user_accounts');
File
- ./
twitter.inc, line 417
Code
function twitter_tweets($screen_name = NULL) {
$query = db_select('twitter', 't')
->fields('t');
if (isset($screen_name)) {
$query
->condition('t.screen_name', $screen_name);
}
$result = $query
->execute();
$tweets = array();
foreach ($result as $row) {
if (!empty($row->entitites)) {
$row->entities = unserialize($row->entities);
}
$tweets[] = $row;
}
return $tweets;
}