2010-12-13 1 views
0

안녕하세요! 신뢰할 수있는 월별 활성 사용자 번호를 내 애플리케이션에서 가져올 수 없습니다. FQL을 사용해 보았습니다.월간 활성 사용자가 올바르게 페이스 북 그래프 API를 통해 문제가 발생했습니다.

[...] 
    $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 
     ) 
)

를?

답변

1

페이스 북 통계 데이터를 바로 사용할 수 없습니다. 통계 그래프에는 항상 이전 데이터 만 표시됩니다.

현재 monthly_active_users 번호에 관심이 있으시면 applications 테이블을 fql로 살펴보십시오.

+0

안녕하세요! 그게 날 도와 줬어! 나는 또한 이것을 발견했다 : http://stuff24.de/blog/monthly-active-users-facebook-fql/ – acy