2

我正在尝试获取已安装我的应用程序的用户数量。我正在发送基于以下信息构建的 fql 查询:

https://developers.facebook.com/docs/reference/fql/insights/#Metrics

由于这条指令,我需要调用指标 'application_installed_users',期间未指定“lifetime”和 end_time。

我尝试在https://developers.facebook.com/tools/中调用:

SELECT metric, value FROM insights WHERE object_id=<my_app_id> AND metric='application_installed_users' AND period=period('lifetime')

此查询给出以下错误:

{ "error": { "message": "You must specify a bounded date range using unix time stamps as constant values.", "type": "NoIndexFunctionException", "code": 604 } }

所以我也试过:

SELECT metric, value FROM insights WHERE object_id=<my_app_id> AND metric='application_installed_users' AND end_time=0 AND period=period('lifetime')

whick 导致空数据。

调用“application_installed_users”的正确查询是什么?

干杯, Maciek

4

2 回答 2

0

If you look at Facebook's documentation for the insights table, you'll see some fields marked with a half-filled star. These are their index fields, and you must supply values for all of these fields in your WHERE clause.

In your case, you're receiving an empty data package because you're asking for end_time=0, which is limiting the data to the start of epoch time. Try supplying recent end_time and that should solve your issue.

于 2013-04-03T01:22:20.527 回答
0

我刚用了这个... AND end_time = end_time_date('2013-04-04') ...,它奏效了。

于 2013-04-04T15:20:32.913 回答