You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Facebook Marketing API创建含城市定位的广告组报错求助

解决Facebook Marketing API定位重叠错误(Error Subcode 1487756)

错误原因

你遇到的error_subcode: 1487756是因为同时指定了父级地理范围(美国)和其子级范围(美国境内的城市),Meta的定位系统会判定这两个范围重叠——目标城市已经包含在你指定的国家范围内,不需要重复声明。

修复方案

直接移除targeting参数中的countries字段,只保留需要定位的城市即可。

修改后的广告组创建请求

curl -X POST https://graph.facebook.com/v21.0/$MY_META_ACCOUNT_ID/adsets \
  -F 'name=My Ad Set' \
  -F 'campaign_id=6680088172618' \
  -F 'daily_budget=1000' \
  -F 'targeting={"geo_locations":{"cities":[{"key":2427178}]}}' \
  -F "access_token=$MY_META_ACCESS_TOKEN" \
  -F "billing_event=IMPRESSIONS"

补充说明

如果你的需求是定位美国境内多个特定城市,同时排除其他地区,可以用excluded_geo_locations来实现,示例如下:

-F 'targeting={"geo_locations":{"countries":["US"],"excluded_geo_locations":{"cities":[{"key":另一个城市key}]}}}'

内容的提问来源于stack exchange,提问作者Tarik Waleed

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.15 09:47:36