You are here

function twitter_set_status in Twitter 7.6

Same name and namespace in other branches
  1. 6.5 twitter.inc \twitter_set_status()
  2. 6.2 twitter.inc \twitter_set_status()
  3. 6.3 twitter.inc \twitter_set_status()
  4. 6.4 twitter.inc \twitter_set_status()
  5. 7.3 twitter.inc \twitter_set_status()
  6. 7.4 twitter.inc \twitter_set_status()
  7. 7.5 twitter.inc \twitter_set_status()

Post a message to twitter

Parameters

$twitter_account: object with a Twitter account.

$status: string message to publish.

Return value

array response from Twitter API.

3 calls to twitter_set_status()
twitter_actions_tweet in twitter_actions/twitter_actions.module
Submits a tweet and processes the response.
twitter_drush_tweet in ./twitter.drush.inc
Callback for Drush command 'twitter-tweet'.
twitter_post_entity_insert in twitter_post/twitter_post.module
Implementation of hook_entity_insert().

File

./twitter.inc, line 217

Code

function twitter_set_status($twitter_account, $status) {
  $twitter = twitter_connect($twitter_account);
  if (empty($twitter)) {
    return FALSE;
  }
  return $twitter
    ->statuses_update($status);
}