gpt4 book ai didi

configuration - 应用程序配置不允许给定 URL

转载 作者:行者123 更新时间:2023-12-03 05:40:14 24 4
gpt4 key购买 nike

我在我的 html 页面中使用了这个...

<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 方法时,它都会在我的控制台中显示

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.

这是我的 Facebook 应用程序设置..我需要在这里更改一些内容吗?我暂时在本地运行我的网站,所以我尝试添加

localhost/OfferDrive/ to app domain on this page but it says error that it is not a valid domain

fb app settings

最佳答案

您需要使用值http://localhost/OfferDrive/填写Website with Facebook Login的值,以允许Facebook验证来自 JavaScript SDK 的请求是否来自正确的位置

关于configuration - 应用程序配置不允许给定 URL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14474122/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com