You are here

public function TwitterOAuth::get_request_token in Twitter 7.3

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

File

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

Class

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

Code

public function get_request_token() {
  $url = $this
    ->create_oauth_url('oauth/request_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;
}