Facebook graph api 为Facebook Graph Ad API查询指定操作类型
我在扩展API查询以仅包含特定操作时遇到了一些困难。我可以很好地运行以下查询:Facebook graph api 为Facebook Graph Ad API查询指定操作类型,facebook-graph-api,facebook-ads-api,Facebook Graph Api,Facebook Ads Api,我在扩展API查询以仅包含特定操作时遇到了一些困难。我可以很好地运行以下查询: https://graph.facebook.com/v2.10/act_11111111111111111/ads?fields=name,insights{actions.filtering("action_type":comment)}&limit=1 …但结果包含的操作类型比预期的多 "data": [ { "name": "Test Name", "insights": { "
https://graph.facebook.com/v2.10/act_11111111111111111/ads?fields=name,insights{actions.filtering("action_type":comment)}&limit=1
…但结果包含的操作类型比预期的多
"data": [
{
"name": "Test Name",
"insights": {
"data": [
{
"actions": [
{
"action_type": "comment",
"value": "2"
},
{
"action_type": "link_click",
"value": "142"
},
{
"action_type": "post_reaction",
"value": "16"
},
{
"action_type": "video_view",
"value": "630"
},
{
"action_type": "page_engagement",
"value": "790"
},
{
"action_type": "post_engagement",
"value": "790"
}
],
"date_start": "2017-08-26",
"date_stop": "2017-09-24"
}
],
我只想返回“评论”和“链接点击”,类似于
https://graph.facebook.com/v2.10/act_11111111111111111/ads?fields=name,insights{actions?action_type=comment,link_click}&limit=1
谢谢大家! 试试这个 此图URI仅适用于单个广告,不适用于广告帐户级别,但您可以如下所示设置您的逻辑
https://graph.facebook.com/v3.0/<ad_id>/insights?fields=actions&filtering=[{field: "action_type",operator:"IN", value: ['like', 'comment','landing_page_view','link_click','offsite_conversion','cost_per_lead']}]&access_token=<Your Access Token>
https://graph.facebook.com/v3.0//insights?fields=actions&filtering=[{字段:“操作类型”,运算符:“输入”,值:[“喜欢”,“评论”,“登陆页面查看”,“链接点击”,“异地转换”,“每潜在客户成本]}和访问令牌=
您可以在广告帐户中请求所有广告:
/act_<yourAdAccount>/insights
?level=ad
&fields=actions,ad_name,ad_id
&filtering=[{field: "action_type",operator:"IN", value: ['comment']}]
/act\u/insights
?级别=ad
&字段=操作、广告名称、广告id
&筛选=[{字段:“操作类型”,运算符:“IN”,值:['comment']}]