3
votes

I redirect the user of my application to Twitter for oauth style authentication using my app's request_token. The user is able to enter username and password on Twitter's page BUT then, instead of calling back my application, Twitter displays a page

You've successfully granted access to MyAppName!

Simply return to MyAppName and enter the following PIN to complete the process. 123456

Why is this happening?

I have set the callback url in my app's settings.

Thanks

2

2 Answers

4
votes

Same thing is happening me. I just find the solution.

You can put :oauth_callback parameter to get request token.

Note: Because latest oauth gem, changes made in create and callback method on 29/04/2010

Check this document. http://blog.brijeshshah.com/integrate-twitter-oauth-in-your-rails-application/comment-page-1/

@request_token = UsersController.consumer.get_request_token(:oauth_callback => "callback-url-of-your-twitter-app")
3
votes

When you get a PIN code it means the application is configured as Desktop Application, see http://apiwiki.twitter.com/Authentication. To change this go to the twitter application page: http://twitter.com/apps/, sign in with your twitter account for your application and in Edit Application Settings, change the Application Type to Browser.