[...] $end_time = date('Y-m-d', time()-(60*60*24*2)); // Dont' know what is correct. Sometimes it's *2 sometimes it's working with *3 $fql = $facebook->api(array( "method" => "fql.query", "query" => "SELECT metric, value FROM insights WHERE object_id='000000000' AND metric='application_active_users' AND end_time=end_time_date('".$end_time."') AND period=period('month')" )); [...]
看起来无法获得最新的价值。我想获得与我的申请页面上所述相同的价值。但是这个代码每天都有所不同。
我也试过这个解决方案:
$fql = $facebook->api('/000000000/insights/application_active_users/month');
但作为回应,我只得出几天前的过时值:
Array ( [data] => Array ( [0] => Array ( [id] => 000000000/insights/application_active_users/month [name] => application_active_users [period] => month [values] => Array ( [0] => Array ( [value] => 166345 [end_time] => 2010-12-09T08:00:00+0000 ) [1] => Array ( [value] => 167679 [end_time] => 2010-12-10T08:00:00+0000 ) [2] => Array ( [value] => 168983 [end_time] => 2010-12-11T08:00:00+0000 ) ) [description] => Monthly Users who have engaged with your application or viewed your application (Unique Users) ) ) [paging] => Array ( [previous] => https://graph.facebook.com/000000000/insights/application_active_users/month?since=1291556506&until=1291815706 [next] => https://graph.facebook.com/000000000/insights/application_active_users/month?since=1292074906&until=1292334106 ) )
我做错了什么?
答案 0 :(得分:1)
Facebook洞察数据暂时无法使用。洞察图始终仅显示历史数据。
如果您对当前的monthly_active_users
号感兴趣,可以使用fql查看applications
表。