简体   繁体   中英

Using Scribe library for Oauth in Twitter with callback url

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

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.

See the Twitter example.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM