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

Twitter getAccessToken problem #48

Closed
sergii-okhotnyi opened this issue Jan 20, 2011 · 1 comment
Closed

Twitter getAccessToken problem #48

sergii-okhotnyi opened this issue Jan 20, 2011 · 1 comment

Comments

@sergii-okhotnyi
Copy link

Hi, can you check this:
I've had permanent error on method getAccessToken():
W/System.err( 420): java.lang.IllegalArgumentException: Response body is incorrect. Can't extract a token from an empty string
W/System.err( 420): at org.scribe.utils.Preconditions.check(Preconditions.java:80)
W/System.err( 420): at org.scribe.utils.Preconditions.checkEmptyString(Preconditions.java:40)
W/System.err( 420): at org.scribe.extractors.TokenExtractorImpl.extract(TokenExtractorImpl.java:25)
W/System.err( 420): at org.scribe.oauth.OAuth10aServiceImpl.getAccessToken(OAuth10aServiceImpl.java:72)

I've been struggling with this error for 2 days, until has found that twitter4j is sending VERIFIER paramer in body. I have changed
//request.addOAuthParameter(OAuthConstants.VERIFIER, verifier.getValue());
to
request.addBodyParameter(OAuthConstants.VERIFIER, verifier.getValue());

and it finally it got working.

Can you check this out whether this is a bug?

@fernandezpablo85
Copy link
Collaborator

I could not reproduce it, it's working for me on 1.1.0

Glad to hear you could fix it though :)

This issue was closed.
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