gpt4 book ai didi

facebook - 在 Facebook Marketing api 中创建 geo_locations 定位规范时获取无效的参数响应

转载 作者:行者123 更新时间:2023-12-03 22:34:29 24 4
gpt4 key购买 nike

我正在尝试在 facebook 营销 api 调用中将城市添加到我的 geo_location 目标中。

$targeting_spec = array(
'geo_locations' => [
'countries' => ['US'],
'cities' =>
['key' => '2490299','radius' => 10, 'distance_unit' => 'mile']
],

'age_min' => 13,

);

我上面的代码似乎应该是正确的,尤其是在查看文档后 here .但是我收到以下错误:

{"error":{"message":"Invalid parameter","type":"OAuthException","code":100,"error_subcode":1487079,"is_transient":false,"error_user_title":"Invalid Targeting Spec","error_user_msg":"The specified targeting spec is not valid because: Invalid data for field geo_locations. Invalid Targeting Spec: The specified targeting spec is not valid because: Normalization expecs a KeyedTraversable. TAAL[BLAME_file]\n","fbtrace_id":"HwU9EMDTah1"}}



似乎在说我的 geo_locations 字段有一些无效的东西,但我不知道那可能是什么。有任何想法吗?谢谢你。

最佳答案

对于最终来到这里的任何迷失的灵魂,我弄清楚出了什么问题。正确的定位如下:

$targeting_spec = array(
'geo_locations' => [
'cities' =>
array(['key' => '2490299','radius' => 10, 'distance_unit' => 'mile'])
],

'age_min' => 13,

);

关于facebook - 在 Facebook Marketing api 中创建 geo_locations 定位规范时获取无效的参数响应,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41203116/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com