Beispiel #1
0
 /**
  * Get access token
  *
  * @param   string $verifier OAuth verifier, got after authorization
  * @access  protected
  * @return  array
  */
 protected function _setupAccessToken($verifier)
 {
     ApiDebug::p('requesting access token');
     $oauth = $this->_getOAuthInstance(OAUTH_AUTH_TYPE_FORM);
     $oauth->setToken(self::$_requestToken, self::$_requestSecret);
     $accessTokenInfo = $oauth->getAccessToken(ApiUtils::getFullUrl(self::URL_ATOKEN, 'api'), null, $verifier);
     ApiDebug::p('got access token info', $accessTokenInfo);
     self::$_accessToken = $accessTokenInfo['oauth_token'];
     self::$_accessSecret = $accessTokenInfo['oauth_token_secret'];
     return $accessTokenInfo;
 }