public function getAccessToken(Token $requestToken, Verifier $verifier)
 {
     $request = new OAuthRequest($this->api->getAccessTokenVerb(), $this->api->getAccessTokenEndpoint());
     $request->addOAuthParameter(OAuthConstants::TOKEN, $requestToken->getToken());
     $request->addOAuthParameter(OAuthConstants::VERIFIER, $verifier->getValue());
     $this->addOAuthParams($request, $requestToken);
     $this->addSignature($request);
     $response = $request->send();
     return $this->api->getAccessTokenExtractor()->extract($response->getBody());
 }
 public function getAccessToken(Token $requestToken, Verifier $verifier)
 {
     $request = new OAuthRequest($this->api->getAccessTokenVerb(), $this->api->getAccessTokenEndpoint());
     $request->addQuerystringParameter(OAuthConstants::CLIENT_ID, $this->config->getApiKey());
     $request->addQuerystringParameter(OAuthConstants::CLIENT_SECRET, $this->config->getApiSecret());
     $request->addQuerystringParameter(OAuthConstants::CODE, $verifier->getValue());
     $request->addQuerystringParameter(OAuthConstants::REDIRECT_URI, $this->config->getCallback());
     if ($this->config->hasScope()) {
         $request->addQuerystringParameter(OAuthConstants::SCOPE, $this->config->getScope());
     }
     $response = $request->send();
     return $this->api->getAccessTokenExtractor()->extract($response->getBody());
 }