Facebook 页面 leadgen webhook returns 错误 102 服务器故障

Facebook page leadgen webhook returns error 102 Server Failure

Facebook 页面 leadgen webhook 不适用于我的页面和关联的应用程序。

如果我测试我使用 testing tool 设置的 webhook 并单击 "Track status" 按钮,发布的实时更新对象与此错误相关联:102 Server failure

我的 Facebook 设置包括:

页面、广告帐户和应用程序都属于业务,应用程序似乎正确订阅了页面:它列在图表 api 调用 /<page-id>/subscribed-apps 的结果中.

有人知道我可能遗漏了什么吗?

非常感谢。

好的,我找到问题了。

尽管我的应用已使用所有有效且永不过期的令牌正确订阅了该页面,但缺少一项授权。

如果您遇到同样的问题,请按照以下步骤操作:

-> go to business manager
-> go to busienss settings
-> go to leads access tab
-> select your page
-> click "CRMs"
-> Select your app and assign access

万岁

最近的一项更改(自 2018 年 5 月 1 日起)是应用程序状态必须为 "Live" 才能接收实际的 webhook 更新。如果保留 "In Development",webhook 请求现在将失败,错误代码为 102 "Server failure"(非常有用的消息!),应用程序的 Webhooks 页面 (https://developers.facebook.com/apps/{your app ID}/webhooks/) 将显示一条消息说:

Applications will only be able to receive test webhooks sent from the app dashboard while they are in development. No production data, including that of app admins, developers, and testers, will be delivered unless the app is live.

我花了一段时间才弄明白,因为 webhook 之前一直在工作。希望这对一些人有帮助!

在将我的页面订阅到 Facebook 应用程序时,我设置了 leadgen_fat 而不是 leadgen 并收到此错误。

在登录时将 retrieve_leads 添加到您的范围,并确保您的应用具有此 permission.Then 添加 leadgen 到订阅字段。

我知道这真的很旧,但我遇到了同样的问题,这就是我发现的。

"You can use this tool to create and delete test leads for your forms; however, you cannot use the tool in developer mode."

基本上是说,如果您处于开发模式,您将收到 102 消息,这没有意义为什么他们会有一个测试工具,您只能在您的应用处于 "live".[=11= 时使用]

我解决了这个问题,这是 RTU 调试工具无法正常工作的问题,直到我将我的应用程序设置为 LIVE 状态然后它才能正常工作。同样在 FB 文档上,它清楚地显示

当您之前使用 Facebook 文档启动 webhooks 时,platform.php 文件代码会让您订阅“feed”而不是“leadgen”,因此请检查您的订阅代码是否正确。我在他们的文档中记录了这个错误,看起来他们已经修复了它。

https://developers.facebook.com/support/bugs/681262475926363/

https://developers.facebook.com/docs/marketing-api/guides/lead-ads/quickstart/webhooks-integration/

FB.api(
  '/' + page_id + '/subscribed_apps',
  'post',
  {access_token: page_access_token, subscribed_fields: 'leadgen'},
  function(response) {
    console.log('Successfully subscribed page', response);
  }
);

还要检查

  1. 您的应用已上线并通过审核
  2. 您拥有所有权限。
  3. 您订阅了正确的类型,即“leadgen”
  4. 商务管理平台帐户、所有者或客户已授予您的 CRM 访问线索和管理页面的权限。

我用下一个 CURL 解决了这个问题。

将应用程序注册到页面:

curl -i -X POST "https://graph.facebook.com/{pague_id}/subscribed_apps?subscribed_fields=leadgen&access_token={token_id}"

leadgen字段很重要

我的服务器响应很好!

{"id":"XXXXXXX","time":1606958566,"data":{"value":{"form_id":"7415707530XXXX","leadgen_id":"891990681XXXXX","created_time":1606958565,"page_id":"375141142501174"},"field":"leadgen"}