FB.Event.subscribe("comment.create") 触发但 returns 500 评论第一次成功回复时

FB.Event.subscribe("comment.create") fires but returns 500 when commenting first successful when replying

FB评论插件报错500。 FB.Event.Subscribe("comment.create',callback) 被触发但没有 return 成功而是抛出 500 error.However,这只发生在第一个 comment.The post 仍然通过并在页面重新加载时显示为评论。

然而,在同一个 post 上,当回复 posted 评论时,它会在没有任何错误的情况下触发事件。

我正在使用 facebook 评论插件,我的设置是通过从数据库获取数据创建动态 url,然后基于前面的数据创建 url end.I 我正在使用backend.My 的前端和 Flask 的淘汰赛目标是利用 FB 评论插件作为每个 post.I 的线程评论当有人评论 post 时触发推送通知post.

的 ID
//HTML
<div data-bind="text:$data.location, 
click:window.animateMarkerOnClick.bind($data), attr: { id: 
$data.key,class:'search-list' }"></div>
<div id="listing-msg" > 
</div>
<div class="fb-comments" data-bind='attr:{"href": 
"http://localhost:8080/postit/get_share_listings/#" + 
$data.key,"id":$data.key}' data-width="320" data-numposts="1" data- 
colorscheme = "dark" notify = "true" data-order-by = "reverse_time"></div>

//JS EVENT SUBSCRIPTION
window.fbAsyncInit = function() {
    FB.init({
      appId            : 'xxxxxxx',
      autoLogAppEvents : true,
      xfbml            : true,
      version          : 'v3.2'
    });
  FB.Event.subscribe("comment.create", push)

};

 (function(d, s, id){
 var js, fjs = d.getElementsByTagName(s)[0];
 if (d.getElementById(id)) {return;}
 js = d.createElement(s); js.id = id;
 js.src = "https://connect.facebook.net/en_US/sdk.js";
 fjs.parentNode.insertBefore(js, fjs);

}(文档,'script','facebook-jssdk'));

//callback
function push(){
$.ajax({
     type: "POST",
     url: "http://localhost:8080/postit/push",
     contentType: 'application/json;charset=UTF-8',



 data:JSON.stringify({"data":document.activeElement.
 parentElement.parentElement.parentElement.children[0].id})
 })

}

如前所述,该事件触发回调,但在第一条评论 facebook 触发 url 处理程序 createComment,它给出 500 但 createReply 成功触发回调。

JS SDK 中不再存在 comment.create 事件。

https://developers.facebook.com/docs/reference/javascript/FB.Event.subscribe/v3.2 does not mention it any more, when you click the down arrow next to event, and https://developers.facebook.com/support/bugs/927463134113943/?comment_id=930637043796552 确认它消失了:“comment.create 被正式杀死。”

您现在需要使用服务器端 webhook,如果您希望您的应用程序收到有关通过评论插件发表的新评论的通知,请参阅 https://developers.facebook.com/docs/graph-api/webhooks/reference/application/#plugin_comment