设置Facebook评论社交插件的版主时遇到问题
我正在尝试使用下面的代码添加Facebook评论社交插件的版主。似乎无论我输入什么Facebook用户ID,唯一可以调节的用户是在Facebook端设置为应用程序管理员的用户。谁能告诉我我做错了什么设置Facebook评论社交插件的版主时遇到问题,facebook,facebook-javascript-sdk,facebook-social-plugins,facebook-comments,Facebook,Facebook Javascript Sdk,Facebook Social Plugins,Facebook Comments,我正在尝试使用下面的代码添加Facebook评论社交插件的版主。似乎无论我输入什么Facebook用户ID,唯一可以调节的用户是在Facebook端设置为应用程序管理员的用户。谁能告诉我我做错了什么 <!DOCTYPE html> <html xmlns:fb="https://www.facebook.com/2008/fbml"> <head> <meta name="viewport" content="initial-scale
<!DOCTYPE html>
<html xmlns:fb="https://www.facebook.com/2008/fbml">
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta charset="UTF-8">
<meta property="fb:admins" content="xxxxxxxxxxxxxxxx"/>
<meta property="fb:moderator" content="xxxxxxxxxxxxxxxxxx"/>
<meta property="fb:app_id" content="xxxxxxxxxxxxxxxxxxx"/>
</head>
<body>
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js#appId=xxxxxxxxxxxxx&xfbml=1"></script>
<fb:comments href="" numposts="10" width="480" colorscheme="dark" migrated=1> </fb:comments>
</div>
<div id="user-info"></div>
<p>
<button id="fb-auth">
Login
</button>
</p>
<script>
//Facebook
window.fbAsyncInit = function() {
FB.init({
appId: 'xxxxxxxxxxxxxxxxxx',
status: true,
cookie: true,
xfbml: true,
oauth: true
});
function updateButton(response) {
var button = document.getElementById('fb-auth');
if (response.authResponse) {
//user is already logged in and connected
var userInfo = document.getElementById('user-info');
var actionInfo = document.getElementById('action-info');
FB.api('/me', function(response) {
userInfo.innerHTML = '<img src="https://graph.facebook.com/' + response.id + '/picture">' + response.name;
button.innerHTML = 'Logout';
});
button.onclick = function() {
FB.logout(function(response) {
var userInfo = document.getElementById('user-info');
userInfo.innerHTML="";
});
};
} else {
//user is not connected to your app or logged out
button.innerHTML = 'Login';
button.onclick = function() {
FB.login(function(response) {
if (response.authResponse) {
FB.api('/me', function(response) {
var userInfo = document.getElementById('user-info');
userInfo.innerHTML = '<img src="https://graph.facebook.com/' + response.id + '/picture" style="margin-right:5px"/>' + response.name;
});
} else {
//user cancelled login or did not grant authorization
}
}
,{scope:'email'}
);
}
}
}
// run once with current status and whenever the status changes
FB.getLoginStatus(updateButton);
FB.Event.subscribe('auth.statusChange', updateButton);
};
(function() {
var e = document.createElement('script'); e.async = true;
e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
document.getElementById('fb-root').appendChild(e);
}());
</script>
</body>
</html>
根据,您应该将网站注册为应用程序,然后您可以通过管理界面管理版主,而无需硬编码版主。根据,您应该将您的网站注册为应用程序,然后您可以通过管理界面管理版主,而不必硬编码版主。我希望您能得到答案,我也一直在努力解决这个问题。看起来很多人都这样做了。如果你明白了,请发帖子,我也会发帖子。你不能通过实际的评论小部件自己来做吗?我相信它在一个上下文菜单中。我希望你能得到答案,我也一直在努力解决这个问题。看起来很多人都有。如果你明白了,请发帖子,我也会发帖子。你不能通过实际的评论小部件自己来做吗?我相信它在一个上下文菜单中。