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?
1. Log in to the Facebook for Developers center, and proceed to My Apps / Facebook Login (steps 1-3 above). 2. In the Valid OAuth redirect URIs field, type the redirect URI for your website and then press ENTER.
Invalid Redirect URI While working on a web based client, you have to ensure that the redirect URI passed while authentication, is the same as the one given during registration. If the redirect uri is not the one given during registration, an invalid redirect uri error will be thrown.
A redirect URI, or reply URL, is the location where the authorization server sends the user once the app has been successfully authorized and granted an authorization code or access token.
In your app settings on https://developers.facebook.com/sa/apps/<my-app-id> , make sure that you add the Facebook Login product. Then under "Client OAuth Settings" enter the URL in the "Valid OAuth redirect URIs" box.
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.
In my case there was no /
at the end of mine redirect uri! No comments to fb..
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