Given URL is not allowed by the Application configuration.: One or more of the given URLs is not allowed by the App's settings - facebook

This error appears in the authentication process:
Given URL is not allowed by the Application configuration.: One or more of the given URLs is not allowed by the App's settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App's domains.
Why is this happening, and how can I fix it?

I ran into this issue when I was doing some learning exercises a few days ago while creating a Facebook app and using Heroku as the host. My problem was that I had the wrong URL in my Facebook app settings for the "Website with Facebook Login" field value.
Also, for some hosts the URL may change depending on settings etc., so check your hosting URLs for the app and make sure you have the correct URL in that field on Facebook app settings.
Once I updated mine, the error went away and all is fine.
Good Luck!
Connie

If you are on your development machine, be sure that you don't mix up localhost:3000 with 0.0.0.0:3000. Although on your development machine it is practically the same thing, the Facebook API won't recognise this and will return the error. Make sure the url is exactly the same everywhere.

Related

How to do local development with Facebook app?

There are many similar questions on SO but Facebook constantly changes settings and protocols, so answers provided several years ago no longer work or can't be applied.
I attempt to add Facebook Login to my app using JS SDK. When I try it from http://127.0.0.1:8000/, popup tells me that I must add this address domain to "Application domains" in app settings. However, this can't be done for localhost. Here's what I tried so far:
Adding 127.0.0.1 or localhost to app domains, which gives an error message: "App domains must match the domain of the Secure Canvas URL, Mobile Site URL, Unity Binary URL, Site URL or Secure Page Tab URL. Please correct these domains: localhost".
Creating test app and changing Site URL to http://127.0.0.1:8000/, then adding 127.0.0.1 to app domains. This seemingly works, but after accessing settings page again settings remain unchanged and login doesn't work either.
What does seem to work is setting Site URL on main app, but this is undesirable - I want it to work with my production site URL and test apps are supposed to be used for development.

Unable to login to Facebook when running App locally

I have the facebook javascript in my page. When I click on the button, I get this error
Given URL is not allowed by the Application configuration.: One or
more of the given URLs is not allowed by the App's settings. It must
match the Website URL or Canvas URL, or the domain must be a subdomain
of one of the App's domains.
I'm attaching my settings for my app.
http://dev.vibecheck.com:8080/vibecheckdata/vibeCheck
I have changed my host files and added an entry which maps to dev.vibecheck.com Any clues why I'm getting this error ?
The issue was with an setting in advanced Panel. The Oauth re-direction URL had a different domain than the one which I was running it on. So Please make sure that all the domains and the all the URLs you have match.

Yet another Facebook OAuth error 500

Today I moved my facebook application to nodejitsu and I couldn't figure out what was wrong in the oauth/dialog GET request.
I validated that I had:
added the new application domains to my application settings
the redirect URI was good, for example, app.nodejitsu.com
I played around so much with these properties and I didn't figure out why it was still giving me a 500 error. I checked most of the posts on stackoverflow and although they all seemed to be valid errors, they didn't seem to reflect my issue.
This is how I found my problem.
After migrating the app to nodejitsu my localhost app still worked. So I decided to remove localhost from the accepted app domains in the facebook settings. When I tested it again I got this error:
"Given URL is not allowed by the Application configuration.: One or more of the given URLs is not allowed by the App's settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App's domains."
Ok, so this made my think. If the problem was with an incorrect domain I would still get this message for nodejitsu, so I had an error with the request I reckoned.
I manually edited the request and I figured out that my redirect_uri did not start with http.
I changed this and it worked.

Having an issue with phonegap facebook login without plugin

I have a phonegap app in iOS and I'm trying to do a login with facebook. I'm using the javascript sdk. When I try to use fb.getlogin status or fb.login, not sure which, it gives me this error:
"Given URL is not allowed by the Application configuration.: One or more of the given URLs is not allowed by the App's settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App's domains."
I have searched for this error, obviously, but nothing seems to solve my issue.
I looked in the facebook app settings, and everything seems to be in order.
I'm probably crazy for asking this with so little detail, but, any suggestions, ideas?
I have never used their SDK but I would have to guess that you are making the javascript calls from within your app and the SDK is saying that it doesnt recognize the URL that the call is coming from. Even though your phone doesn't have a URL (though you could give it one but that is a whole different story) it does still have an IP and that IP isnt matching what FB is expecting. I am sure you registered for a FB developer account or something like that and it asked for a URL of where the calls would be coming from. That needs to match. I dont know how you would get around this. I think you need to use the plugin.

Facebook login error: Given URL is not permitted by the application configuration.:

I am creating a facebook login on my site, following this guide: https://developers.facebook.com/docs/howtos/login/getting-started/
I started out by creating an app on facebook, then used the app ID in my code. After completing step 2 in the guide, i wanted to test for errors. I keep getting the above error "Given URL is not permitted by the application configuration.: One or more of the given URLs is not allowed by the App's settings...."
To resolve the issue, i tried to change the app website URL to http://www.mywebpage.com/index.html. That didn't do anything....
Any ideas?
Thanx
Also double check your app ID. I was using a test app id while developing locally and forgot to switch it back to the real app ID.
Double check your App settings. Usually absolute URLs can cause errors. Adding the root URL (without www if you have subdomains) mywebsite.com in your App domain would probably solve your issue.