@@ 711-719 (lines=9) @@ | ||
708 | $this->account = $account; |
|
709 | } |
|
710 | ||
711 | public function getRequestToken($oauth_callback) |
|
712 | { |
|
713 | $parameters = array(); |
|
714 | $parameters['oauth_callback'] = $oauth_callback; |
|
715 | $request = $this->oAuthRequest($this->requestTokenURL(), 'GET', $parameters); |
|
716 | $token = self::parse_parameters($request); |
|
717 | ||
718 | return $token; |
|
719 | } |
|
720 | ||
721 | /** |
|
722 | * Exchange request token and secret for an access token and |
|
@@ 731-739 (lines=9) @@ | ||
728 | * "user_id" => "9436992", |
|
729 | * "screen_name" => "abraham") |
|
730 | */ |
|
731 | public function getAccessToken($oauth_verifier) |
|
732 | { |
|
733 | $parameters = array(); |
|
734 | $parameters['oauth_verifier'] = $oauth_verifier; |
|
735 | $request = $this->oAuthRequest($this->accessTokenURL(), 'GET', $parameters); |
|
736 | $token = self::parse_parameters($request); |
|
737 | ||
738 | return $token; |
|
739 | } |
|
740 | ||
741 | // This function takes a input like a=b&a=c&d=e and returns the parsed |
|
742 | // parameters like this |