Given URL is not allowed by the Application configuration, facebook - facebook

Hi guys i am getting 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.
many people are facing this error because their redirect url mismatch or either they are placing wrong clint id or secret id, but
in my case
1. Redirect URL is fine,
2. app id and app secret are also fine.
what could be the problem? please help me

You have to set your domain within your application in the application settings.
See the following screenshot, the "App Domains" setting is set to "testapp.com".
Your URL for your Page Tab for example has to be of the same domain as the on you specified here.

Related

What URL's are allowed as domains for your app?

I am trying to set up my Facebook app, but I keep getting error messages when I try to input my app domain.
This is the first error message that I receive.
"This must be derived from Canvas URL, Secure Canvas URL, Unity Binary URL, Site URL, Mobile Site URL, Page Tab URL or Secure Page Tab URL. Check and correct the following domains: www.livelocalandprosper.com"
So I tried adding an "s" after the http and got an error message that said that "top level domains are not allowed".
I also tried using the web app host site's URL, but it wouldn't accept that either. I got the same error message about top level domains.
I have asked the web app host and my website provider, but didn't get any helpful answers there.
Could someone please enlighten me on what I need to do?
Before you can fill in a domain in the app settings, you need to add a Platform, such as a Canvas app, and add the appropriate URL.
i.e. I have a test app, and after adding the Canvas app URL http://bithoop.la/canvas.php?ref=facebook and saving it, I can add bithoop.la to the domain box.
https://www.evernote.com/shard/s53/sh/66259600-af67-46de-b34c-a9cb0f0cf319/db0384a2fdbe7c7a9cea57bdaafad84b

Facebook Share Does not Display image

I found this in javascript console
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.
when I tried to share a link on Facebook. Here is the Link. The problem is, the share dialog does not show the image.
Any Suggestions?
The error is quite straight-forward.
You have not properly configure the application settings. Make sure you've added the correct link in the Site Url

Facebook OAuth Login: Invalid site URL and Invalid app domain

My app's domain is thehub.j.layershift.co.uk
In the "App Domains' box, I'm attempting to put: thehub.j.layershift.co.uk
I also have selected Website with Facebook Login and in the Site URL box, I'm trying to put: http://thehub.j.layershift.co.uk/login
Everything works fine with "localhost:8080", while I was testing. What are these domains invalid?
EDIT:
Tried again, still not working. Surely this can't be this difficult???
EDIT AGAIN:
Screenshot: http://i.imgur.com/rGkrZn4.png?1
FINAL EDIT:
Turns out this was an issue was Facebook. After speaking with a support dude over there, he fixed it in about .5seconds. Thanks for the help!
Try the following (worked for me):
In the app domain put layershift.co.uk
In the app URL put http://thehub.j.layershift.co.uk
thehub.j.layershift.co.uk is not a domain - it is a URL. You should try placing only the domain in the domain field.
That would be -
layershift.co.uk
The other parts of the URL (thehub.j) are subdomains of layershift.co.uk.
One more thing that you might want to take a look at is the fact that the URL http://layershift.co.uk is actually being redirected to http://layershift.com. Facebook is not able to retrieve data from that URL while it is being redirected.
With regard to the Site URL, what you'll want to put there is the landing page of your site/application. When you set the Site URL to /login, anyone reaching your application (logged in or not) will be directed to the /login page.

Facebook tab application without Canvas URL

You know when you create a tab application you have Page Tab section with Page Tab URL: and Secure Page Tab URL:. In my app i want to use FB.init for Fb.login but if I call FB.init 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.
And this is because I dont complete the App on Facebook section from the App configuration, the idea is that i don`t want to complete. What is the alternative?
It might sound counterintuitive, but in your app settings (right near where you set up your Page Tab URLs) you need to open the Website with Facebook Login section and fill in a Site URL. A typical example would be http://mydomain.gov:8080/, but you can include a longer path than / if you want. Also, if you haven't already filled in App Domains, add a domain there to match the Site URL. In my example, it would be mydomain.gov.
The pages that you use the JS SDK on, as well as your redirect_uri in any dialog URLs, needs to begin with the Site URL that you configure.

Inconsistent results for Facebook redirect to HTTPS

My homepage redirects to the URL listed below to open an oauth dialogue with Facebook to validate user credentials.
<meta http-equiv="refresh" content="0;URL=http://www.facebook.com/dialog/oauth/?client_id=myclientid&redirect_uri=http://www.mywebsite.com/home/index.php" />
The Site URL (Website with Facebook login) in my Facebook App profile is
http://www.mywebsite.com
Everything works great for HTTP but when I recently implemented an SSL certificate I struggled to convert everything to HTTPS (changing HTTP to HTTPS in my redirect URLs and the Site URL in my Facebook app profile. I get the following Facebook error:
API Error Code: 191
API Error Description: The specified URL is not owned by the application
Error Message: Invalid redirect_uri: Given URL is not allowed by the Application configuration.
I've fought with this a few hours at a time but was never successful and always just changed the redirect URL and the Site URL in my app profile back to HTTP. Last night it worked! I published the code and tested it successfully on two separate computers in both IE and Chrome. This morning I woke up to the same error code I was getting before.
Does anyone have any ideas why my Facebook oauth dialogue seems to be fickle when it comes to HTTPS?
Make sure that you have a valid base domain specified in your app settings.
This is a working example of a website with Facebook connect. At the top I have added a code to:
Detect if the user is authenticated yet and if not it will...
Detect if SSL is being used
If SSL is in use it will check to makes sure that whatever the
current page is (gets dynamically) contains the URL you enter in the
first variable ('$sslurl' in the top settings); otherwise, it will
default back to $sslurl and add whatever page you were visiting to
the end of it.
It will then use the correct url to authorize the user using the
generated SSL url as the redirect_uri
The rest of the script is just a generic website with facebook
connect setup
It's too long to place inside code tags so I put them in a text file here:
http://o-e.us/ssl-facebook-connect.txt
Hopefully it helps, Good luck!