如何在 Graph API Explorer 上为我的广告帐户进一步过滤 Facebook Graph API 查询?

Mad*_*avi 4 facebook facebook-graph-api facebook-ads-api facebook-insights facebook-marketing-api

我正在尝试使用 Facebook Graph API v2.11 进行营销来获取我的应用的广告支出和移动应用安装量。在 Graph API Explorer 中,当我尝试

/act_<my account>/campaigns?fields=insights{actions,spend}&time_range={'since':'2017-07-07','until':'2017-12-12'}
Run Code Online (Sandbox Code Playgroud)

在输出中的“见解”下,我得到了一个这种类型的对象:

    "data": [
      {
        "actions": [             
          {
            "action_type": "comment",
            "value": "3"
          },
          {
            "action_type": "like",
            "value": "33"
          },
          {
            "action_type": "link_click",
            "value": "1531"
          },
          {
            "action_type": "mobile_app_install",
            "value": "1049"
          }
        ],
        "spend": "8621.03",
        "date_start": "2017-10-28",
        "date_stop": "2017-11-26"
      }
    ]
Run Code Online (Sandbox Code Playgroud)

如果我希望它只获取操作类型为“mobile_app_install”的操作,我该如何进一步过滤我的查询?

小智 5

可以在 Facebook 端过滤它,就像这样称呼它:

/act_<yourAdAccount>/insights
  ?level=campaign
  &fields=actions,spend
  &time_increment=all_days
  &time_range={'since':'2017-07-07','until':'2017-12-12'}
  &filtering=[{field: "action_type",operator:"IN", value: ['mobile_app_install']}]
  &use_account_attribution_setting=true
Run Code Online (Sandbox Code Playgroud)