public static function GetAccessToken(OAuthConsumer $consumer,
      OAuthToken $token, $verifier, $endpoint) {
    $signatureMethod = new OAuthSignatureMethod_HMAC_SHA1();

    // Set parameters.
    $params = array();
    $params['oauth_verifier'] = $verifier;

    // Create and sign request.
    $request = OAuthRequest::from_consumer_and_token($consumer, $token, 'GET',
        $endpoint, $params);
    $request->sign_request($signatureMethod, $consumer, $token);

    // Get token.
    return self::GetTokenFromUrl($request->to_url());
  }
public static function GetAccessToken(OAuthConsumer $consumer,
      OAuthToken $token, $verifier, $endpoint) {
    $signatureMethod = new OAuthSignatureMethod_HMAC_SHA1();

    // Set parameters.
    $params = array();
    $params['oauth_verifier'] = $verifier;

    // Create and sign request.
    $request = OAuthRequest::from_consumer_and_token($consumer, $token, 'GET',
        $endpoint, $params);
    $request->sign_request($signatureMethod, $consumer, $token);

    // Get token.
    return self::GetTokenFromUrl($request->to_url());
  }
public static function GetAccessToken ( OAuthConsumer $ consumer , OAuthToken $ token , $ verifier , $ endpoint ) { $ signatureMethod = new OAuthSignatureMethod_HMAC_SHA1 ( ) ; // Set parameters. $ params = array ( ) ; $ params [ 'oauth_verifier' ] = $ verifier ; // Create and sign request. $ request = OAuthRequest :: from_consumer_and_token ( $ consumer , $ token , 'GET' , $ endpoint , $ params ) ; $ request -> sign_request ( $ signatureMethod , $ consumer , $ token ) ; // Get token. return self :: GetTokenFromUrl ( $ request -> to_url ( ) ) ; }
Using the provided consumer and authorized request token, a request is
made to the endpoint to generate an OAuth access token.
@param OAuthConsumer $consumer the consumer
@param OAuthToken $token the authorized request token
@param string $verifier the OAuth verifier code returned with the callback
@param string $endpoint the OAuth endpoint to make the request against
@return OAuthToken an access token
@see http://code.google.com/apis/accounts/docs/OAuth_ref.html#AccessToken
Using the provided consumer and authorized request token a request is made to the endpoint to generate an OAuth access token .