users@jersey.java.net

[Jersey] Twitter authorization failing

From: Arun Gupta <arun.p.gupta_at_oracle.com>
Date: Fri, 13 Jan 2012 16:27:45 -0800

I'm using OAuthFilter to communicate with Twitter. request_token,
authorize, access_token, callback etc all seem to happen correctly. But
sending an authorized request to twitter servers is failing. The twitter
team seems to think the signatures generated in the OAuthFilter may not
be correct. More details about this at:

https://dev.twitter.com/discussions/4865

Couple of questions ...

Is Jersey using OAuth 1.0 or OAuth 1.0a ?

Can I dump the base string that is used for generating the signature ?

Twitter's method of signature generation is document at:

https://dev.twitter.com/docs/auth/creating-signature

The complete code is at:

http://java.net/projects/weblogic-examples/sources/weblogic-12c-user-examples/content/arun.gupta/javaee6/twitter/src/main/java/org/javaee6/samples/twitter/TwitterClient.java?rev=36

I tried the oauth-twitter-client and that seem to work fine. But could
not understand how to change the sample to use web-based authentication
instead of OOB.

Any thoughts ?

Thanks,
-Arun

-- 
http://twitter.com/arungupta
http://blogs.oracle.com/arungupta