function hook_tweet_feed_tweet_save_alter in Tweet Feed 7.2
Same name and namespace in other branches
- 7.3 tweet_feed.api.php \hook_tweet_feed_tweet_save_alter()
Alter twitter feed tweet node before saving.
You can populate custom fields in the new node and handle data unsupported natively by the module.
Parameters
$node: the node about to be created.
$tweet: the raw tweet data retreived from the twitter api.
1 invocation of hook_tweet_feed_tweet_save_alter()
- tweet_feed_save_tweet in ./
tweet_feed.module - Save The Tweet (and profile)
File
- ./
tweet_feed.api.php, line 20 - Describe hooks provided by the Tweet Feed module.
Code
function hook_tweet_feed_tweet_save_alter(&$node, &$tweet) {
// This example populates a custom field with the name of the original tweet
// user:
$node->retweeted_from[$node->language][] = $tweet->retweeted_status->user->name;
}