Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Response body is incorrect. Can't extract a token from this #548

Closed
saschaarthur opened this issue Mar 22, 2015 · 1 comment
Closed

Response body is incorrect. Can't extract a token from this #548

saschaarthur opened this issue Mar 22, 2015 · 1 comment

Comments

@saschaarthur
Copy link

Hello,

i would like to report some trouble with expired FB tokens. It seems it should be handled better but TokenExtractor fails:

heres the line im Calling in java:

String code = request.getParameter("code");
Verifier v = new Verifier(code);
Token accessToken = OAuthHelper.FacebookOAuth.service.getAccessToken(null, v);

Heres the Stacktrace:

Exception:org.scribe.exceptions.OAuthException: Response body is incorrect. Can't extract a token from this: '{"error":{"message":"This authorization code has expired.","type":"OAuthException","code":100}}'

org.scribe.exceptions.OAuthException: Response body is incorrect. Can't extract a token from this: '{"error":{"message":"This authorization code has expired.","type":"OAuthException","code":100}}'
at org.scribe.extractors.TokenExtractor20Impl.extract(TokenExtractor20Impl.java:32)
at org.scribe.oauth.OAuth20ServiceImpl.getAccessToken(OAuth20ServiceImpl.java:37)

Im running maven 1.37

@fernandezpablo85
Copy link
Collaborator

how would you handle it better?

On Sun, Mar 22, 2015, 11:24 AM saschaarthur notifications@github.com
wrote:

Hello,

i would like to report some trouble with expired FB tokens. It seems it
should be handled better but TokenExtractor fails:

heres the line im Calling in java:

String code = request.getParameter("code");
Verifier v = new Verifier(code);
Token accessToken = OAuthHelper.FacebookOAuth.service.getAccessToken(null,
v);

Heres the Stacktrace:

Exception:org.scribe.exceptions.OAuthException: Response body is
incorrect. Can't extract a token from this: '{"error":{"message":"This
authorization code has expired.","type":"OAuthException","code":100}}'

org.scribe.exceptions.OAuthException: Response body is incorrect. Can't
extract a token from this: '{"error":{"message":"This authorization code
has expired.","type":"OAuthException","code":100}}'
at
org.scribe.extractors.TokenExtractor20Impl.extract(TokenExtractor20Impl.java:32)
at
org.scribe.oauth.OAuth20ServiceImpl.getAccessToken(OAuth20ServiceImpl.java:37)


Reply to this email directly or view it on GitHub
#548.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants