Given URL is not allowed by the Application configuration
Solution 1
The problem is that whatever url you are currently hosting your app is not setup in your Application configuration. Go to your app settings and ensure the urls are matching.
Updated
Steps:
- Go to 'Basic' settings for your app
- Select 'Add Platform'
- Select 'Website'
- Put your website URL under 'Site URL'
Solution 2
This can also happen when the redirect_uri
submitted with the https://www.facebook.com/dialog/oauth request is not present in the list of Valid OAuth redirect URIs under:
- Settings >> Advanced >> Security
After much trial and error, when I added the redirect_uri
that I was using (https://www.facebook.com/connect/login_success.html in my case), I suddenly got to the step past this error.
Solution 3
The above answers are right, but you have to make sure you input right URL.
You have to go to: https://developers.facebook.com/apps
- Select your app
- Click settings
- Enter contact email (for publishing)
- Click on +add platform
- Add your platform (probably WEB)
- Enter site URL
You have two choices to enter: http://www.example.com or http://example.com
Your app will work only with one of them. In order to make sure your visitors will use your desired url, use .htaccess on your domain.
Here's good tutorial on that: http://eppand.com/redirect-www-to-non-www-with-htaccess-file/
Enjoy!
Solution 4
Go to your application, settings (basic tab) and add platform (website). Type your site url and done.
Solution 5
Do the above work of adding the site and then the url.
I think the layout of facebook has changed little bit so also do the below things.
- Go to developers.facebook.com -> your app
- Go to Settings->Advanced.
- Under the Security->Valid OAuth redirect URIs, insert all the uri's your app is supposed to redirect to. For example (
http://localhost:1443/cas/login, https://localhost:2443/cas/login, http://rajanpupa.com/cas/login
etc)
- That should do it.
Slazer
Updated on March 10, 2020Comments
-
Slazer about 4 years
I am trying to create facebook sign-in page according to this tutorial. I only changed the two lines
appId : '370675846382420', // App ID channelUrl : '//http://bp.php5.cz/channel.html', // Channel File
and I get the following 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.
What might be the problem?
-
Kyasa Madhavi almost 11 yearsI did same as you said above .developers.facebook.com/apps/myappid/summary?ref=nav.Here i have mention "example.com" in "App Domains" , and "Website with Facebook Login" - Site URL: is "htttp://example.com" and my html page in which I am calling FB.getLoginStatus is placed at example.com/facebookEX4.htm. But still I am gettting same error. Could you tell me what i am missing still ?
-
Alkanshel over 10 yearsThis can happen if you're testing an app on localhost that's configured in fb to work with www.mysite.com. Go to your hosts file and point www.mysite.com to your ip, and then test it on mysite.com (which will be your dev environment)
-
SJG about 10 yearsFor me the fix was registering the FULL url! mysite.com/somefolder/somepage.php
-
Vexter about 10 yearsMake sure to also put in a port number if you're not using port 80 in localhost server. I'm using 9000 so I had to put in mysite.com:9000 to get it to function
-
Ritesh A almost 10 yearsThis is the answer I was looking for.
-
Grasper over 9 yearswhat if I don't want it to be tied to my URL? I'm making WP plugin and they will host it on their domain.
-
Codecat over 9 yearsThanks, this was my case. Seems like
login_success.html
used to work fine without manually approving it, but they "recently" changed it or something. -
RPDeshaies about 9 yearsIs it possible to register multiple urls ? dev, staging, prod, etc. ?
-
Shade about 9 yearsHey, what about the part with the "...or the domain must be a subdomain of one of the App's domains"? Is this not valid for sharing from websites?
-
jimjamslam over 8 yearsWhen I click
Add Platform
,Website
is greyed out. -
Mario over 8 yearsThis is super important to remember. The OAuth Redirect URI and the Site URL must be consistent! +1
-
Michal Hosala over 8 yearsAlso review Armand's answer below. It cost me quite some time to realize logins are failing occasionally when users type www.mydomain.com into browser instead of just mydomain.com. Had to apply some URL rewrite rules on the server.
-
Oscar Ortiz over 8 years@David Alpert you are the man, I can't believe these details aren't always mentioned in tutorials around the web (Android/SDK/Xamarin)
-
Remya R about 8 yearsmy issue is this can any one help me URL Blocked: This redirect failed because the redirect URI is not whitelisted in the app’s Client OAuth Settings. Make sure Client and Web OAuth Login are on and add all your app domains as Valid OAuth Redirect URIs.
-
Remya R about 8 yearsWhat for this? URL Blocked: This redirect failed because the redirect URI is not whitelisted in the app’s Client OAuth Settings. Make sure Client and Web OAuth Login are on and add all your app domains as Valid OAuth Redirect URIs. also it is working in some browsers
-
code-8 about 8 yearsWhat should I add into the site URL, if I don't have the public domain name yet, but I have the ip address of my VM that running my site. Can anyone please advise ?