给定的URL不被应用程序配置所允许 [英] Given URL is not permitted by the application configuration
问题描述
我在我的html页面中使用过这个文件...
I have used this in my html page...
<script>
window.fbAsyncInit = function() {
// init the FB JS SDK
FB.init({
appId : 'xxxxxxxxxxxxxx', // App ID from the App Dashboard
status : true, // check the login status upon init?
cookie : true, // set sessions cookies to allow your server to access the session?
xfbml : true // parse XFBML tags on this page?
});
// Additional initialization code such as adding Event Listeners goes here
};
// Load the SDK's source Asynchronously
// Note that the debug version is being actively developed and might
// contain some type checks that are overly strict.
// Please report such bugs using the bugs tool.
(function(d, debug){
var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
if (d.getElementById(id)) {return;}
js = d.createElement('script'); js.id = id; js.async = true;
js.src = "//connect.facebook.net/en_US/all" + (debug ? "/debug" : "") + ".js";
ref.parentNode.insertBefore(js, ref);
}(document, /*debug*/ false));
function shareOnFb(action, msg){
FB.ui({
method: action,
message: msg
});
}
</script>
当我尝试调用任何FB方法,它在我的控制台中说这个
when every I try to call any FB method it says this in my console
应用程序配置不允许给定URL:应用程序的设置不允许多出一个或
个给定的URL。必须
与网站网址或Canvas网址匹配,或者网域必须是其中一个Apps网域的子域
。
Given URL is not permitted 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 Apps domains.
这是我的fb应用程序设置..我需要改变的东西在这里,m运行我的网站在本地的时间,所以我试着添加
this is my fb app setting.. do i need to change something here, m running my website locally for time being, so i tried adding
localhost / OfferDrive /到此网页上的应用程式网域,但它显示错误,表示它不是有效的网域
localhost/OfferDrive/ to app domain on this page but it says error that it is not a valid domain
推荐答案
您需要使用值 http:// localhost / OfferDrive /
填写 / em>允许Facebook验证来自JavaScript SDK的请求来自正确的位置
You need to fill the value for Website with Facebook Login with the value http://localhost/OfferDrive/
to allow Facebook to authenticate that the requests from JavaScript SDK are coming from right place
这篇关于给定的URL不被应用程序配置所允许的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!