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!!!
Enable 3rd Party Application in TwitterClick "App Settings". Scroll down to your app and click the settings (cog) icon. Scroll down to "Authentication settings" and click "Edit". Toggle "Enable 3-legged OAuth" to be on, and we'll need to fill in two properties, Callback URLs and Website URL .
The callback URL typically specifies the URL of an app that is designated to receive an authorization code on behalf of the client app. In addition, this URL string is used for validation.
As users work through these flows, they need a web page or location to be sent to after they have successfully logged in and provided authorization to the developer's App. This follow-up webpage or location is called a callback URL.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With