Facebook api 2.7 - 没有指定的指标

时间:2016-10-25 06:26:19

标签: php facebook facebook-graph-api

我一直在使用以下请求从facebook api接收数据:

143357502355510/feed?fields=insights{name,title}&since=1474732800&until=1477324800&limit=100

但在弃用版本2.6之后我将sdk版本更改为2.7,此错误正在接收:

"error": {
"message": "Invalid query",
"type": "OAuthException",
"code": 3001,
"error_subcode": 1504028,
"is_transient": false,
"error_user_title": "No Metric Specified",
"error_user_msg": "No metric was specified to be fetched. Please specify one or more metrics to be fetched and try again.",
"fbtrace_id": "XXXXXXXXXXX"
}

无论如何要更改请求并获得与以前相同的数据?

1 个答案:

答案 0 :(得分:5)

在这里找到答案:

check this post

我将请求更改为:

143357502355510/feed?fields=insights.metric(post_impressions_unique,post_impressions){values,title}&since=1474732800&until=1477324800&limit=100