Domanda

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!!!

È stato utile?

Soluzione

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.

Altri suggerimenti

See the Twitter example.

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

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top