function TwittersOAuth::oAuthRequest in jQuery social stream 7
Same name and namespace in other branches
- 7.2 jquery_social_stream.js.inc \TwittersOAuth::oAuthRequest()
Format and sign an sOAuth / API request
6 calls to TwittersOAuth::oAuthRequest()
- TwittersOAuth::delete in ./
jquery_social_stream.js.inc - DELETE wrapper for oAuthReqeust.
- TwittersOAuth::get in ./
jquery_social_stream.js.inc - GET wrapper for oAuthRequest.
- TwittersOAuth::getAccessToken in ./
jquery_social_stream.js.inc - Exchange request token and secret for an access token and secret, to sign API calls.
- TwittersOAuth::getRequestToken in ./
jquery_social_stream.js.inc - Get a request_token from Twitter
- TwittersOAuth::getXAuthToken in ./
jquery_social_stream.js.inc - One time exchange of username and password for access token and secret.
File
- ./
jquery_social_stream.js.inc, line 257 - JS callbacks.
Class
- TwittersOAuth
- Twitter sOAuth class
Code
function oAuthRequest($url, $method, $parameters) {
if (strrpos($url, 'https://') !== 0 && strrpos($url, 'http://') !== 0) {
$url = "{$this->host}{$url}.{$this->format}";
}
$request = sOAuthRequest::from_consumer_and_token($this->consumer, $this->token, $method, $url, $parameters);
$request
->sign_request($this->sha1_method, $this->consumer, $this->token);
switch ($method) {
case 'GET':
return $this
->http($request
->to_url(), 'GET');
default:
return $this
->http($request
->get_normalized_http_url(), $method, $request
->to_postdata());
}
}