小编map*_*ter的帖子

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

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

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

            'age_min' => 13,

        );
Run Code Online (Sandbox Code Playgroud)

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

{"error":{"message":"无效参数","type":"OAuthException","code":100,"error_subcode":1487079,"is_transient":false,"error_user_title":"无效的定位规范" ,"error_user_msg":"指定的定位规范无效,因为:字段 geo_locations 的数据无效。无效的定位规范:指定的定位规范无效,因为:规范化需要 KeyedTraversable。TAAL[BLAME_file]\n","fbtrace_id" :"HwU9EMDTah1"}}

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

facebook facebook-graph-api facebook-marketing-api

4
推荐指数
1
解决办法
2577
查看次数