views:

646

answers:

3

I am trying to use FBGraph to let my app publish messages on the users wall. However, all of the APIs are kind of foreign to me and I am just trying to change things and see what happens. Right now, I am getting this error message

{
   "error": {
      "type": "OAuthException",
      "message": "Invalid redirect_uri: Given URL is not allowed by the Application configuration."
   }
}

Does anyone know what it means by redirect_uri? What would it be on my Application Settings page on facebook?

+1  A: 

I am not a facebook expert, but I hit the exact same problem as you a few hours ago when I was trying to login a user inside a web application with Facebook.

It seems that the redirect_uri which you specify in your call to "https://graph.facebook.com/oauth/authorize" must be on the same domain as the Connect Url of your application. (you can set that connect url from the Connect section in your application's settings)

Regards, Florin

Florin Dumitrescu
+2  A: 

Florin is correct. Just a note here.. when testing locally you will need to set it to:

http://localhost:3000/ (or whatever your app server port is)

Then when you move it to production, set it to your regular URL:

http://yourdomain.com/

I have a separate facebook app that I use in development to test, so I don't have to change back and forth between them and I set up the keys in a settings file, which has my tokens for development and production apps.

Anyways, looks like you are almost there. It is making it back to the callback url at least. Should be fine once you update the facebook_connect URL

cowboycoded
A: 

Just verify your 'Application ID'. In my case I had that problem because I was using ID from my other project that I was working on. Fairly obvious but I lost some time.

j t

related questions