0

I'm very new to Grails, and I'm trying the Oauth plugin.

I configured my plugin as here:

oauth {
        providers {
            twitter {
                api = TwitterApi
                key = 'xxxxx'
                secret = 'xxxxx'
            }
        }
        debug = true
}

and added the link in my gps file like this:

<oauth:connect provider="twitter">Connect to Twitter</oauth:connect>

but when I run my app and click on the Connect to Twitter link I been taken to :

http://localhost:8080/oauth/twitter/authenticate

why this is happening. This looks so wired. Rather than taking me to the twitter page for login its taking me here.

Where I have been making the mistake?

Thanks in advance.

sriram
  • 8,562
  • 19
  • 63
  • 82
  • When you sign up on Facebook developers you have to write a callback url, I can't remember right now if Twitter asks for it too, but you should check. – reixa Feb 26 '13 at 11:47

2 Answers2

1

Twitter requires a callback URL to be passed. Please pass an additional attribute in your oauth providers as following:

oauth {
        providers {
            twitter {
                api = TwitterApi
                key = 'xxxxx'
                secret = 'xxxxx'
                callback = 'http://<your-web-site>/<application-namespace>/<controller>/<action>'
            }
        }
        debug = true
}

Please add the website to your hosts file if you're working on a development machine.

Sharath
  • 65
  • 5
0

Here is a link for Integration with twitter using Grails Oauth Plugin. Hope it will help you. Enjoy.

user1791574
  • 1,729
  • 2
  • 16
  • 30