Using the Scribe library for Oauth on Twitter with a URL callback

I use twitter in my application using a scribe. After the user authenticates my application and redirects to the new URL, I received oauth_token and oauth_verifier, but I could not figure out how to generate oauth_token and oauth_secret. Please solve the problem and thank you in advance.

+5
source share
2 answers

I solved the problem by simply creating a new services constructor (as in the example) on the redirected page and using oauth_token and oauth_verifier, you will get when u will be redirected to a new page, such as

Token requestToken = new Token(request.getParameter("oauth_token"),request.getParameter("oauth_verifier"));
Verifier verifier = new Verifier(request.getParameter("oauth_verifier"));

the rest is the same as in the example.

+6
source
+1

All Articles