b-ryce b-ryce - 2 months ago 7
Javascript Question

Facebook "Invalid redirect_uri", but the url looks fine to me

I'm getting the following error when trying to authenticate to Facebook with OAuth:

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


My url looks like this:

https://graph.facebook.com/oauth/authorize?client_id=283993944973616&redirect_uri=http://dennys-m.appspot.com/fb_login/&scope=publish_stream,email&display=popup


I know there are a lot of other posts with this problem, but I can't see what would make my url invalid. Any ideas why I'm getting this error?

Answer

Your redirect url: http://dennys-m.appspot.com/fb_login/ must match the canvas url in https://developers.facebook.com/apps/ configuration panel.

Fortunately, these days Facebook gives the error message Invalid redirect_uri: Given URL is not allowed by the Application configuration. About a year ago no such exception appeared, just strange results.