我们正在尝试使用服务器端脚本为我们的 Facebook 应用程序获取一些洞察数据。问题在于,对于我们感兴趣的案例,我们在 FQL 洞察表中看不到任何有价值的数据:“故事印象”和任何“点击”。同时,统计信息可在 facebook 管理面板的应用洞察部分中获得。我们尝试了所有类型的访问令牌,但结果相同。似乎并非所有指标数据都可用于 FQL。我们做错了什么吗?有什么方法可以使用 Insights API 获取这些见解数据?
谢谢。
App ID:321206841333892 以下是我们使用的一些示例查询:
示例 FQL 请求 1:指标 post_impressions
Request:https://graph.facebook.com/fql
params:Array
(
[q] => {"post_impressions|lifetime":"SELECT metric, value, end_time, period FROM insights WHERE object_id=321206841333892 AND metric='post_impressions' AND period=period('lifetime') AND end_time<=end_time_date('2013-04-09') AND end_time>=end_time_date('2013-03-10')"}
[access_token] =>ACCESS_TOKEN
[method] => GET
)
结果:空集。
示例 FQL 请求 2:指标 application_active_users
Request:https://graph.facebook.com/fql
params:Array
(
[q] => {"application_active_users|day":"SELECT metric, value, end_time, period FROM insights WHERE object_id=321206841333892 AND metric='application_active_users' AND period=period('day') AND end_time<=end_time_date('2013-04-09') AND end_time>=end_time_date('2013-03-10')","application_active_users|week":"SELECT metric, value, end_time, period FROM insights WHERE object_id=321206841333892 AND metric='application_active_users' AND period=period('week') AND end_time<=end_time_date('2013-04-09') AND end_time>=end_time_date('2013-03-10')","application_active_users|month":"SELECT metric, value, end_time, period FROM insights WHERE object_id=321206841333892 AND metric='application_active_users' AND period=period('month') AND end_time<=end_time_date('2013-04-09') AND end_time>=end_time_date('2013-03-10')"}
[access_token] =>ACCESS_TOKEN
[method] => GET
)
结果:25 个重要值。