function twitter_statuses_oembed in Twitter 6.5
Same name and namespace in other branches
- 7.6 twitter.inc \twitter_statuses_oembed()
- 7.5 twitter.inc \twitter_statuses_oembed()
Retrieve an embedded Tweet.
Parameters
int $tweet_id: Status ID of the tweet.
Return value
array Response from Twitter API.
1 call to twitter_statuses_oembed()
- _twitter_filter_embed_tweet in ./
twitter.module - Callback for Embedded Tweets.
File
- ./
twitter.inc, line 243
Code
function twitter_statuses_oembed($tweet_id) {
// Need to request any global account, though preferably a global account.
$twitter = twitter_connect(NULL, TRUE, TRUE);
if (empty($twitter)) {
watchdog('twitter', 'Unable to load an authenticated Twitter account to embed a tweet.');
return FALSE;
}
else {
$params = array(
'hide_media' => !variable_get('twitter_media', FALSE),
'hide_thread' => !variable_get('twitter_conversation', FALSE),
'align' => variable_get('twitter_align', 'none'),
);
return $twitter
->statuses_oembed($tweet_id, $params);
}
}