public function TwitterOAuth::auth_request in Twitter 6.3
Same name and namespace in other branches
- 7.3 twitter.lib.php \TwitterOAuth::auth_request()
Perform an authentication required request.
Overrides Twitter::auth_request
2 calls to TwitterOAuth::auth_request()
File
- ./
twitter.lib.php, line 413 - Classes to implement the full Twitter API
Class
- TwitterOAuth
- A class to provide OAuth enabled access to the twitter API
Code
public function auth_request($url, $params = array(), $method = 'GET') {
$request = OAuthRequest::from_consumer_and_token($this->consumer, $this->token, $method, $url, $params);
$request
->sign_request($this->signature_method, $this->consumer, $this->token);
switch ($method) {
case 'GET':
return $this
->request($request
->to_url());
case 'POST':
return $this
->request($request
->get_normalized_http_url(), $request
->get_parameters(), 'POST');
}
}