2012-01-21 43 views
1

我无法弄清end_dateperiod参数(?)的含义以及page_impressions度量标准(不带参数)的API调用结果。Facebook Insights关于end_date,句点和API调用结果的说明

我查询了上周的page_impressions。响应包含周期“周”(即第二个数组),并且还包含3个不同的嵌套数组,其中end_time。这个结束时间让我很困惑。

这应该如何解释?我是否应该使用PHP SDK的api()方法来控制这些参数?

这是一个样响应:

array 
    'id' => string '194501267300320/insights/page_impressions/day' (length=45) 
    'name' => string 'page_impressions' (length=16) 
    'period' => string 'day' (length=3) 
    'values' => 
    array 
     0 => 
     array 
      'value' => int 1473 
      'end_time' => string '2012-01-17T08:00:00+0000' (length=24) 
     1 => 
     array 
      'value' => int 1100 
      'end_time' => string '2012-01-18T08:00:00+0000' (length=24) 
     2 => 
     array 
      'value' => int 1194 
      'end_time' => string '2012-01-19T08:00:00+0000' (length=24) 
    'title' => string 'Daily Total Impressions' (length=23) 
    'description' => string 'Daily The number of impressions seen of any content 
    associated with your Page. (Total Count)' (length=92) 

array 
    'id' => string '194501267300320/insights/page_impressions/week' (length=46) 
    'name' => string 'page_impressions' (length=16) 
    'period' => string 'week' (length=4) 
    'values' => 
    array 
     0 => 
     array 
      'value' => int 12762 
      'end_time' => string '2012-01-17T08:00:00+0000' (length=24) 
     1 => 
     array 
      'value' => int 11943 
      'end_time' => string '2012-01-18T08:00:00+0000' (length=24) 
     2 => 
     array 
      'value' => int 12280 
      'end_time' => string '2012-01-19T08:00:00+0000' (length=24) 
    'title' => string 'Weekly Total Impressions' (length=24) 
    'description' => string 'Weekly The number of impressions seen of any content 
    associated with your Page. (Total Count)' (length=93) 

Facebook开发页说,这大约period

在此期间,所述度量收集期间的长度,以秒表示 作为86400(日),604800(星期),2592000 (月)或0(终生)中的一个或使用功能周期(),其中需要一个 个字符串日,周,月或一生。

注意:每个指标可能没有可用的所有时段。

end_time

在此期间收集的指标的时间段的结束, 表示为UNIX时间(应该始终是午夜,太平洋 夏令时)或使用函数end_time_date()采用'YYYY-MM-DD'格式的日期字符串 。

回答

0

这是我的猜测:

对于指数0:从2012-01-11到2012-01-17有12762个网页展示

'period' => string 'week' (length=4) 
0 => 
    array 
     'value' => int 12762 
     'end_time' => string '2012-01-17T08:00:00+0000' (length=24) 

对于指数1:从2012- 01-10至2012-01-16共有11943页展示

'period' => string 'week' (length=4) 
1 => 
    array 
     'value' => int 11943 
     'end_time' => string '2012-01-18T08:00:00+0000' (length=24) 
+0

那么这是一个很好的起点。我必须找到一种方法来确认这一点,即使我不明白如何将'end_date'传递给http://developers.facebook.com/docs/reference/php/facebook-api/ – gremo

+0

您的问题是来解释(你甚至粗暴的那部分,所以我们不会错过它)。不是如何传递end_date。这完全是一个单独的问题。后续问题被忽视,除非它们被创建为一个新问题。 – DMCS