Javascript Facebook评论和喜好问题

Javascript Facebook评论和喜好问题,javascript,facebook,comments,facebook-like,facebook-javascript-sdk,Javascript,Facebook,Comments,Facebook Like,Facebook Javascript Sdk,我想知道用户何时留下评论或喜欢某个页面,所以我使用了 FB.Event.subscribe('comments.add', function(response) { alert('comment add'); }); FB.Event.subscribe('comment.remove', function(response) { alert('comment remove'); }); FB.Event.subscribe('edge.create', func

我想知道用户何时留下评论或喜欢某个页面,所以我使用了

FB.Event.subscribe('comments.add', function(response) {
    alert('comment add');       
}); 
FB.Event.subscribe('comment.remove', function(response) {
    alert('comment remove');
});
FB.Event.subscribe('edge.create', function(response) {
    alert('like add');
});
FB.Event.subscribe('edge.remove', function(response) {
    alert('like remove');
});
只有“comments.add”起作用,这与其他事件不同,所以我猜其他事件还有其他名称吗? like按钮根本不起作用,它会产生以下错误

无法访问的网站无法访问的网页

我正在使用:

<fb:comments numposts="5" notify="true" width="450" height="500" class="fb_iframe_widget">/fb:comments>
/fb:comments>

正如url所示,我正在本地主机环境中工作,这就是问题所在吗?

是的,如果Facebook的爬虫程序无法访问您的页面,它就不会被喜欢。我不确定comments插件是否有那个级别的验证,所以我认为comments插件可能仍然可以工作

thanx我将尝试部署public并测试它。。那么FB.Event.subscribe('comment.remove')呢,你知道如何订阅删除评论吗?应该没有什么特别需要的,当有人从插件中删除他们的评论时,应该触发事件-如果没有,请在上提交错误报告,我们可以查看