【发布时间】:2013-01-06 14:27:10
【问题描述】:
我在我的 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 方法时,它都会在我的控制台中显示这一点
应用程序配置不允许给定 URL。: 一个或 应用程序的设置不允许更多给定的 URL。它必须 匹配网站 URL 或画布 URL,或者域必须是子域 Apps 域之一。
这是我的 fb 应用程序设置.. 我需要在这里更改一些东西吗,我暂时在本地运行我的网站,所以我尝试添加
localhost/OfferDrive/ 到此页面上的应用程序域,但它说错误,它不是一个有效的域
【问题讨论】:
-
@AlexeiLevenkov thnx,但我什至不知道 m 使用图形 API:P thnx 让我知道.. 我现在可以更好地搜索我的查询:D
-
我收到消息 - 应用程序设置不允许 URL。它必须与网站 URL 或画布 URL 匹配,或者域必须是应用程序域之一的子域。
标签: configuration facebook-javascript-sdk facebook-social-plugins