You are here

function twitter_get_tokens in Feeds OAuth 7

Same name and namespace in other branches
  1. 6 feeds_oauth.module \twitter_get_tokens()

The authenticator callback that is used to retrieve the user's access token pair.

Parameters

$uid: The uid for which to retrieve the access token.

$site_id: The site identifier as defined in the OAuth fetcher settings. Here, the "site" refers to the OAuth provider, like Twitter, Facebook, etc.

Return value

An array with keys 'oauth_token' and 'oauth_token_secret' corresponding to the user's OAuth token pair for the given site identifier.

File

./feeds_oauth.api.php, line 46
Documentation of Feeds OAuth hooks.

Code

function twitter_get_tokens($uid, $site_id) {
  return db_fetch_array(db_query("SELECT oauth_token, oauth_token_secret FROM {twitter_account} WHERE uid = %d", $uid));
}