You are here

function TwitterOAuth::getRequestToken in Tweet Feed 7

Same name and namespace in other branches
  1. 6 inc/twitter-oauth.inc \TwitterOAuth::getRequestToken()
  2. 7.3 inc/twitter-oauth.inc \TwitterOAuth::getRequestToken()
  3. 7.2 inc/twitter-oauth.inc \TwitterOAuth::getRequestToken()

Get a request_token from Twitter

@returns a key/value array containing oauth_token and oauth_token_secret

File

inc/twitter-oauth.inc, line 75

Class

TwitterOAuth
Twitter OAuth class

Code

function getRequestToken($oauth_callback) {
  $parameters = array();
  $parameters['oauth_callback'] = $oauth_callback;
  $request = $this
    ->oAuthRequest($this
    ->requestTokenURL(), 'GET', $parameters);
  $token = OAuthUtil::parse_parameters($request);
  $this->token = new OAuthConsumer($token['oauth_token'], $token['oauth_token_secret']);
  return $token;
}