我在https://developers.facebook.com/tools/explorer/
上进行测试我的查询:/v2.8/11111111/leadgen_forms?fields=leads_count,leads
响应:
{ "data": [
{
"name": "My Form",
"leads_count": 37,
"leads": {
"data": [
{
"created_time": "2016-12-21T14:50:56+0000",
"id": "10000000000000",
"field_data": [
{
"name": "email",
"values": [
"hidden@gmail.com"
]
},
{
"name": "first_name",
"values": [
"Hidden"
]
},
{
"name": "last_name",
"values": [
"Hidden"
]
}
]
}
],
"paging": {
"cursors": {
"before": "MTc0ODU4Mjg2MjEyODQ1MgZDZD",
"after": "MTc0ODU4Mjg2MjEyODQ1MgZDZD"
}
}
},
"id": "10000000000000"
}
}
为什么我只有一个数据线,当我在lead_count字段中有37个?
答案 0 :(得分:0)
我实际上看不到您在任何地方访问潜在客户的方式。
在您的请求中,您正在访问页面边缘,请求表单,并在其中请求潜在客户。
您可能应该使用表单ID的边缘来检索潜在客户:
curl -G \
-d 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v2.8/<FORM_ID>/leads
您也可以过滤它们:
curl -G \
-d "filtering=[{'field':'time_created','operator':'GREATER_THAN','value':<TIMESTAMP>}]" \
-d "access_token=<ACCESS_TOKEN>" \
https://graph.facebook.com/<API_VERSION>/<AD_ID>/leads