如何进一步在Graph API Explorer上为我的广告帐户过滤Facebook Graph API查询? [英] How to further filter Facebook Graph API query on Graph API Explorer for my ad account?

本文介绍了如何进一步在Graph API Explorer上为我的广告帐户过滤Facebook Graph API查询?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I'm trying to get the ad spend and mobile app installs for my app using the Facebook Graph API v2.11 for marketing. In the Graph API Explorer, when I try

/act_<my account>/campaigns?fields=insights{actions,spend}&time_range={'since':'2017-07-07','until':'2017-12-12'}

在输出中的洞察"下,我得到了这种类型的对象:

In the output, under "insights", I get an object of this type:

    "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"
      }
    ]

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

If I want it to fetch only the actions where action type is "mobile_app_install", how can I further filter my query?

推荐答案

可以在Facebook端对其进行过滤,就像这样:

There is possible to filter that on Facebook side just call it like that:

/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

这篇关于如何进一步在Graph API Explorer上为我的广告帐户过滤Facebook Graph API查询?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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