public function TwitterOAuth::auth_request in Twitter 7.3
Same name and namespace in other branches
- 6.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 355 - 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');
}
}