Facebook将空POST发送到Webhook [英] Facebook sends empty POST to a webhook

查看:85
本文介绍了Facebook将空POST发送到Webhook的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过Facebook应用程序为我的页面安装Leadh事件的Webhook.所以我有:

  1. 潜在客户来自的Facebook页面
  2. Facebook应用
  3. 我要在其中保存销售线索的Web服务器

我相信

应用程序和网络服务器之间的连接良好. Webhook显示在应用程序页面等上.但是,当我尝试使用此工具创建测试线索时 https://developers.facebook.com/tools/lead-ads-testing 我收到了一个POST请求,其中没有数据.

我怀疑权限问题,但是我可以直接使用PHP SDK从页面(通过Leadgen_id)检查线索,而POST请求只是通过URL从Facebook发送的,所以他们还不知道令牌. /p>

UPD 对相同URL(curl -d "param=value" https://..url..)的普通POST请求可以正常工作.

解决方案

Facebook在请求正文中发送销售线索数据.如果您使用的是框架,请检查您是否有权访问请求正文. 尝试使用Runscope之类的第三方中间服务来查看完整请求,这非常有用

I am trying to install a webhook for leadgen event for my page via a facebook app. So I have:

  1. Facebook Page where leads come from
  2. Facebook App
  3. Webserver where I want to save leads

App and webserver are connected well I believe. Webhook is shown at app page etc. But when I am trying to create a test lead with this tool https://developers.facebook.com/tools/lead-ads-testing I am getting a POST request with no data in it.

I was suspecting permissions problems, but I am able to check a lead from page (via leadgen_id) directly with PHP SDK and the POST request is sent from Facebook just by URL, so they don't know about tokens yet.

UPD Plain POST request to the same url (curl -d "param=value" https://..url..) works as expected.

解决方案

Facebook sends the leads data in the request body. If you are using a framework, please check if you have access to the request body. Try using a third party intermediate service like Runscope to see the full request, it is very usef

这篇关于Facebook将空POST发送到Webhook的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆