You are here

function twitter_connect in Twitter 7.4

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

Connect to the Twitter API.

3 calls to twitter_connect()
twitter_fetch_mentions_timeline in ./twitter.inc
Fetches user's mentions.
twitter_fetch_user_timeline in ./twitter.inc
Fetches a user's timeline
twitter_set_status in ./twitter.inc
Post a message to twitter

File

./twitter.inc, line 14

Code

function twitter_connect($account) {
  $auth = $account
    ->get_auth();
  if (isset($auth['oauth_token']) && isset($auth['oauth_token_secret'])) {
    return new Twitter(variable_get('twitter_consumer_key', ''), variable_get('twitter_consumer_secret', ''), $auth['oauth_token'], $auth['oauth_token_secret']);
  }
  else {
    return FALSE;
  }
}