我正在尝试在facebook营销API调用中将城市添加到我的geo_location定位。
$targeting_spec = array(
'geo_locations' => [
'countries' => ['US'],
'cities' =>
['key' => '2490299','radius' => 10, 'distance_unit' => 'mile']
],
'age_min' => 13,
);
上面的代码似乎应该是正确的,特别是在查看文档here之后。但是我收到以下错误:
{"错误":{"消息":"参数无效","输入":" OAuthException" ,"代码":100," error_subcode":1487079," is_transient":false," error_user_title":"无效的定位规范& #34;," error_user_msg":"指定的定位规范无效,原因是:字段geo_locations的数据无效。无效的定位规范:指定的定位规范无效,原因是:规范化取决于KeyedTraversable。塔尔[BLAME_file] \ n上"" fbtrace_id":" HwU9EMDTah1"}}
似乎在说我的geo_locations字段有些无效,但我不知道那可能是什么。有任何想法吗?谢谢。
答案 0 :(得分:3)
对于任何在这里结束的失落的灵魂,我发现了什么是错的。正确的定位如下:
<?php
require_once("includes/connection.php");
$id = $_POST["id"];
$Result= mysqli_query($conn,"SELECT downloads as total FROM music WHERE mid='$id'");
$Res = mysqli_fetch_assoc($Result);
$re = $Res['total'] + 1;
$updateCount = mysqli_query($conn, "UPDATE music SET downloads= '$re' WHERE mid=$id ");
?>