function twitter_connect in Twitter 6.3
Same name and namespace in other branches
- 6.5 twitter.inc \twitter_connect()
- 6.4 twitter.inc \twitter_connect()
- 7.6 twitter.inc \twitter_connect()
- 7.3 twitter.inc \twitter_connect()
- 7.4 twitter.inc \twitter_connect()
- 7.5 twitter.inc \twitter_connect()
Connect to the API using the 'proper' version (Oauth vs. standard)
2 calls to twitter_connect()
- 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 10
Code
function twitter_connect($account) {
module_load_include('php', 'oauth_common', 'lib/OAuth');
$auth = $account
->get_auth();
if (_twitter_use_oauth() && $auth['oauth_token'] && $auth['oauth_token_secret']) {
module_load_include('lib.php', 'oauth');
return new TwitterOAuth(variable_get('twitter_consumer_key', ''), variable_get('twitter_consumer_secret', ''), $auth['oauth_token'], $auth['oauth_token_secret']);
}
else {
return new Twitter();
}
}