给定的URL不被应用程序配置所允许。当使用Facebook Javascript SDK时 [英] Given URL is not allowed by the Application configuration. when using the Facebook Javascript SDK
问题描述
给定的网址应用程序配置不允许:应用程序的设置不允许使用一个或多个给定的URL。它必须与网站网址或Canvas网址匹配,或者该网域必须是其中一个应用网域的子网域。
我已阅读相关帖子的卡车载入,但仍无法使其运作。我在本地使用以下内容: http:// localhost:8080 / bookbayapp /
。在我的脸书开发者应用程序部分,我有以下内容:
但是再一次,似乎没有任何工作。我目前正在使用谷歌浏览器进行测试,值得一提的是,我正在使用Facebook插件for Phonegap,但是在测试时,我会注释掉插件js的链接,所以我认为在这样做时应该没有任何问题?
适用于我的是使用生产服务器的实际URL,然后向重定向的hosts文件添加一行从该URL到本地主机的所有流量。
假设您的网站名为potatoes.com。在网站网址中写:
http://potatoes.com/bookbayapp
,然后打开您的hosts文件(C:\ Windows \ System32 \\
potatoes.com 127.0.0.1
Im currently using the Facebook Javascript SDK and I keep running into the following problem that appears in the 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.
I've read a truck load of related posts but still can't get it to work. I am working locally using the following: http://localhost:8080/bookbayapp/
. In my facebook developers app section I have the following:
But once again nothing seems to work. I am currently using Google Chrome for the testing and it is worth to mention that I am using the Facebook Plugin for Phonegap but when testing I comment out the link the to plugin js so I assume in doing this there shouldn't be any problems?
What works for me is using the actual URL of the production server, and then adding a line to the hosts file that redirects all traffic from that URL to localhost.
Let's say your website is called potatoes.com. In "Site URL" write:
http://potatoes.com/bookbayapp
and then open your hosts file (C:\Windows\System32\drivers\etc\hosts) and add the following line:
potatoes.com 127.0.0.1
这篇关于给定的URL不被应用程序配置所允许。当使用Facebook Javascript SDK时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!