function TwittersOAuth::getRequestToken in jQuery social stream 7
Same name and namespace in other branches
- 7.2 jquery_social_stream.js.inc \TwittersOAuth::getRequestToken()
Get a request_token from Twitter
@returns a key/value array containing oauth_token and oauth_token_secret
File
- ./
jquery_social_stream.js.inc, line 153 - JS callbacks.
Class
- TwittersOAuth
- Twitter sOAuth class
Code
function getRequestToken($oauth_callback = NULL) {
$parameters = array();
if (!empty($oauth_callback)) {
$parameters['oauth_callback'] = $oauth_callback;
}
$request = $this
->oAuthRequest($this
->requestTokenURL(), 'GET', $parameters);
$token = sOAuthUtil::parse_parameters($request);
$this->token = new sOAuthConsumer($token['oauth_token'], $token['oauth_token_secret']);
return $token;
}