您的一些位置重叠尝试删除位置 脸书营销API

问题描述

在 Facebook Marketing API 中,尝试根据国家/地区、州和城市估算受众规模。 例如,我想知道居住在印度(“country_code”:“IN”)、马​​哈拉施特拉邦(“region_id”:“1735”)、新孟买(“key”:“2677331”)的人群的受众规模有多大。 我正在尝试的 http 请求是

https://graph.facebook.com/v10.0/ad_acc_d/reachestimate?fields=users,estimate_ready&targeting_spec={"geo_locations": { "countries": [ "IN" ],"regions": [ { "key" : "1735" } ],"cities": [ { "key": "2677331"} ]      } }

当我使用图形 API 资源管理器点击请求时,它说

"error_user_title": "Locations can't be used","error_user_msg": "Some of your locations overlap. Try removing a location."

我想根据国家、州和城市获得受众规模。有什么我遗漏的吗?

解决方法

您应该只提供您希望定位的最具体的位置,在这种情况下,新孟买市 ("key": "2677331")。相反,如果您希望针对整个马哈拉施特拉邦地区,请提供那个,并且只提供那个。印度也是如此。

因此,如果您只针对城市,您的请求应如下所示:

act_{account_id}/reachestimate?fields=users,estimate_ready&targeting_spec={"geo_locations": { "cities": [ { "key" : "2677331" } ] } }

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...