FB.event.subscribe('comment.create')不起作用

nam*_*rot 6 facebook

我想在用户使用社交插件发表评论时收到通知.代码如下:

<fb:comments href='someurl' width='400'></fb:comments>
FB.Event.subscribe('comment.create', function(response)
{
 alert(response);
}
Run Code Online (Sandbox Code Playgroud)

很简单,但它不起作用.有人可能有错误吗?从我的在线研究来看,似乎通知没有真正的一致性.有时候它有效,有时则不然.

小智 5

notify="true"属性添加到fb:comments标记.

<fb:comments notify="true" href='someurl' width='400'></fb:comments>
FB.Event.subscribe('comment.create', function(response)
{
 alert(response);
}
Run Code Online (Sandbox Code Playgroud)