Reputation: 4990
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?
Upvotes: 52
Views: 139220
Reputation: 1342
Things have evolved in Facebooks approach, I now realised that you need to "Add Product" to your App: facebook login. make sure oauth & web auth on add my own site url to ""Valid Auth redirect URI" (and removed the default https://www.facebook.com/connect/login_success.html which his in the
Without this I get the URL Blocked error.
Upvotes: 0
Reputation: 302
I'm using the Facebook Canvas platform (Unity WebGL) and I don't needed to add the Website platform. The only thing I did was add my website root url in:
Upvotes: 1
Reputation: 345
This can be caused by incorrect app-ID
In my ionic sample I had the same issue because I had inserted a different "app-ID" in my ionic app other than the app-ID I received from Facebook developer account.
so we have to carefully insert the relavent appID
Upvotes: 0
Reputation: 791
I was getting this error when trying to run my test web page directly from "file:///C:/webtests/myfile.htm". To fix it, I didn't have to make any changes to my App Settings. Instead, I just had to host my HTML file on an actual server and then hit it like: "http://localhost/myfile.htm".
Hope that helps someone.
Upvotes: 1
Reputation: 223
My Problem Solved by
public static final String REDIRECT_URI = "http://google.com";
it will redirect to Url after ur Login into Facebook.and also you have to reach
url : https://developers.facebook.com -> My App -> (Select your app) ->Settings ->Advanced Setting -> Valid OAuth redirect URIs : "http://google.com".
In the place of "http://google.com" you can place ur respective project Url.so,that it will redirect to your Page.
Upvotes: 1
Reputation: 21
I faced the same issue. I had entered http://www.example.com
in the App settings. When anybody accessed my website using the full URL, Facebook Login worked fine. But if somebody typed in the URL without www
in the browser, Facebook Login failed with this error message. When I changed the App Setting to http://example.com
everything started working fine.
Upvotes: 2
Reputation: 636
I ran into this with the IBM BlueMix SSO service and had to use the BlueMix provided redirect URL as my "site" URL instead of my actually web application site URL to fix it. Once I made that change the problem went away.
Upvotes: 0
Reputation: 9163
The other answers here are excellent and accurate. In the interest of adding to the list of things to try:
Double and triple-check that your app is using the right application ID and secret key. In my case, after trying many other things, I checked the application ID and secret key and found that I was using our production settings on our development system. Doh!
Using the correct application ID and secret key fixed the problem.
Upvotes: 1
Reputation: 10945
For me it was the "Single Sign On" (can be seen at the bottome of the screenshot in phwd's answer) setting that was turned off.
Upvotes: 0
Reputation: 3187
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:
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.
Upvotes: 23
Reputation: 19995
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:
Upvotes: 77
Reputation: 1511
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.
Upvotes: 6
Reputation: 2827
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
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!
Upvotes: 10
Reputation: 29
Go to https://developers.facebook.com/apps and open the app you have created. open setting tab and add platform and insert site url where you want to share facebook button .Its done.
Upvotes: 1
Reputation: 2439
Go to your application, settings (basic tab) and add platform (website). Type your site url and done.
Upvotes: 7