You are here

public function TwitterOAuth::get_access_token in Twitter 6.3

Same name and namespace in other branches
  1. 7.3 twitter.lib.php \TwitterOAuth::get_access_token()

File

./twitter.lib.php, line 401
Classes to implement the full Twitter API

Class

TwitterOAuth
A class to provide OAuth enabled access to the twitter API

Code

public function get_access_token() {
  $url = $this
    ->create_oauth_url('oauth/access_token', '');
  try {
    $response = $this
      ->auth_request($url);
  } catch (TwitterException $e) {
  }
  parse_str($response, $token);
  $this->token = new OAuthConsumer($token['oauth_token'], $token['oauth_token_secret']);
  return $token;
}