Created
May 4, 2011 13:37
-
-
Save e2kaneko/955217 to your computer and use it in GitHub Desktop.
PHP PEARのHTTP/OAuth/ConsumerをTwitter用に改造(username, useridの取得)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class HTTP_OAuth_Consumer extends HTTP_OAuth | |
{ | |
protected $userId = null; | |
protected $screenName = null; | |
// 略 | |
public function getAccessToken($url, $verifier = '', | |
array $additional = array(), $method = 'POST' | |
) | |
{ | |
// 略 | |
$this->setUserId($data['user_id']); | |
$this->setScreenName($data['screen_name']); | |
} | |
public function getUserId() | |
{ | |
return $this->userId; | |
} | |
public function setUserId($userId) | |
{ | |
$this->userId = $userId; | |
} | |
public function getScreenName() | |
{ | |
return $this->screenName; | |
} | |
public function setScreenName($screenName) | |
{ | |
$this->screenName = $screenName; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment