트위터 api 버전 변경

This commit is contained in:
chicpro
2014-05-22 13:25:25 +09:00
parent 24d43d3924
commit bc97db94e5

View File

@ -18,11 +18,11 @@ class TwitterOAuth {
/* Contains the last API call. */ /* Contains the last API call. */
public $url; public $url;
/* Set up the API root URL. */ /* Set up the API root URL. */
public $host = "https://api.twitter.com/1/"; public $host = "https://api.twitter.com/1.1/";
/* Set timeout default. */ /* Set timeout default. */
public $timeout = 30; public $timeout = 30;
/* Set connect timeout. */ /* Set connect timeout. */
public $connecttimeout = 30; public $connecttimeout = 30;
/* Verify SSL Cert. */ /* Verify SSL Cert. */
public $ssl_verifypeer = FALSE; public $ssl_verifypeer = FALSE;
/* Respons format. */ /* Respons format. */
@ -74,7 +74,7 @@ class TwitterOAuth {
*/ */
function getRequestToken($oauth_callback) { function getRequestToken($oauth_callback) {
$parameters = array(); $parameters = array();
$parameters['oauth_callback'] = $oauth_callback; $parameters['oauth_callback'] = $oauth_callback;
$request = $this->oAuthRequest($this->requestTokenURL(), 'GET', $parameters); $request = $this->oAuthRequest($this->requestTokenURL(), 'GET', $parameters);
$token = OAuthUtil::parse_parameters($request); $token = OAuthUtil::parse_parameters($request);
$this->token = new OAuthConsumer($token['oauth_token'], $token['oauth_token_secret']); $this->token = new OAuthConsumer($token['oauth_token'], $token['oauth_token_secret']);
@ -123,7 +123,7 @@ class TwitterOAuth {
* "user_id" => "9436992", * "user_id" => "9436992",
* "screen_name" => "abraham", * "screen_name" => "abraham",
* "x_auth_expires" => "0") * "x_auth_expires" => "0")
*/ */
function getXAuthToken($username, $password) { function getXAuthToken($username, $password) {
$parameters = array(); $parameters = array();
$parameters['x_auth_username'] = $username; $parameters['x_auth_username'] = $username;
@ -145,7 +145,7 @@ class TwitterOAuth {
} }
return $response; return $response;
} }
/** /**
* POST wrapper for oAuthRequest. * POST wrapper for oAuthRequest.
*/ */