5
votes

I am implementing twitter in my application using scribe. After the user authenticate my app and is redirected to new url, I got the oauth_token and oauth_verifier but could not figure out how to generate oauth_token and oauth_secret from it. Kindly resolve the issue and thank you in advance!!!

2

2 Answers

6
votes

I've solved the problem just make a new service builder(as in the example) in the redirected page and use the oauth_token and oauth_verifier u'll get when u will be redirected to new page like this

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

rest is same as in example.

2
votes

See the Twitter example.

The oauth token and verifier should be what you need to request an access token and access protected resources.