* @param token the token obtained from a previous call
* @param secret your application secret
* @return a Response object holding either the result in case of a success or the error
*/
public Response retrieveAccessToken(String token, String secret) {
OAuthConsumer consumer = new DefaultOAuthConsumer(info.consumerKey, info.consumerSecret);
consumer.setTokenWithSecret(token, secret);
String verifier = Params.current().get("oauth_verifier");
try {
provider.retrieveAccessToken(consumer, verifier);
} catch (OAuthException e) {
return Response.error(new Error(e));
}
return Response.success(consumer.getToken(), consumer.getTokenSecret());
}