function TwitterOAuth::getRequestToken in jQuery social stream 8
Same name and namespace in other branches
- 8.2 src/Twitter/TwitterOAuth.php \Drupal\jquery_social_stream\Twitter\TwitterOAuth::getRequestToken()
Get a request_token from Twitter
@returns a key/value array containing oauth_token and oauth_token_secret
File
- src/
Twitter/ TwitterOAuth.php, line 81
Class
- TwitterOAuth
- Twitter OAuth class
Namespace
Drupal\jquery_social_stream\TwitterCode
function getRequestToken($oauth_callback = NULL) {
$parameters = array();
if (!empty($oauth_callback)) {
$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;
}