From d8ab4ba404ec0a6ee797bf7aa36d7f6e1d186be2 Mon Sep 17 00:00:00 2001 From: Pablo Fernandez Date: Sun, 13 Mar 2011 10:25:52 -0300 Subject: [PATCH] oauth_callback param should only be sent on the request_token request --- src/main/java/org/scribe/oauth/OAuth10aServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/scribe/oauth/OAuth10aServiceImpl.java b/src/main/java/org/scribe/oauth/OAuth10aServiceImpl.java index 9ab565a..ff5db09 100644 --- a/src/main/java/org/scribe/oauth/OAuth10aServiceImpl.java +++ b/src/main/java/org/scribe/oauth/OAuth10aServiceImpl.java @@ -37,6 +37,7 @@ public class OAuth10aServiceImpl implements OAuthService { OAuthRequest request = new OAuthRequest(api.getRequestTokenVerb(), api.getRequestTokenEndpoint()); addOAuthParams(request, OAuthConstants.EMPTY_TOKEN); + request.addOAuthParameter(OAuthConstants.CALLBACK, config.getCallback()); addOAuthHeader(request); Response response = request.send(); return api.getRequestTokenExtractor().extract(response.getBody()); @@ -49,7 +50,6 @@ public class OAuth10aServiceImpl implements OAuthService request.addOAuthParameter(OAuthConstants.CONSUMER_KEY, config.getApiKey()); request.addOAuthParameter(OAuthConstants.SIGN_METHOD, api.getSignatureService().getSignatureMethod()); request.addOAuthParameter(OAuthConstants.VERSION, getVersion()); - request.addOAuthParameter(OAuthConstants.CALLBACK, config.getCallback()); if(scope != NO_SCOPE) request.addOAuthParameter(OAuthConstants.SCOPE, scope); request.addOAuthParameter(OAuthConstants.SIGNATURE, getSignature(request, token)); }