/**
* Obtain an access token from a request token
*
* @param Horde_Oauth_Token $token Open auth token containing the oauth_token
* returned from provider after authorization
* and the token secret returned with the
* original request token.
* @param array $params Any additional parameters for this request
*
* @return unknown_type
*/
public function getAccessToken($token, $params = array())
{
$params['oauth_consumer_key'] = $this->key;
$params['oauth_token'] = $token->key;
$request = new Horde_Oauth_Request($this->accessTokenUrl, $params);
$request->sign($this->signatureMethod, $this, $token);
$client = new Horde_Http_Client();
try {
$response = $client->post($this->accessTokenUrl, $request->buildHttpQuery());
} catch (Horde_Http_Exception $e) {
throw new Horde_Oauth_Exception($e->getMessage());
}
return Horde_Oauth_Token::fromString($response->getBody());
}