[{"end_time"=>"2012-01-08T08:00:00+0-6ren">
gpt4 book ai didi

facebook - 无法理解 Facebook Insights API 返回的值

转载 作者:行者123 更新时间:2023-11-30 05:27:15 27 4
gpt4 key购买 nike

我不明白 API 返回值的方式。以下是 page_impressions 调用的示例,以“周”作为周期。

"values"=>
[{"end_time"=>"2012-01-08T08:00:00+0000", "value"=>1116},
{"end_time"=>"2012-01-09T08:00:00+0000", "value"=>1171},
{"end_time"=>"2012-01-10T08:00:00+0000", "value"=>1175}]

他们似乎显示了截至“end_time”中的日期为止的过去 7 天内我的点击次数,对吗?如果是,那么我不明白这会有什么用,数据中存在巨大的重叠。

如何获取过去几周的展示次数?我怎样才能显示 3 个以上的值?我真的不明白这背后的逻辑或它有什么用。

最佳答案

此处发生的事情是,您将获得在显示的每个日期结束的 7 天内的 page_impressions 总数(即,该页面在过去 7 天,假设一周在 end_time? 结束,然后在 end_time+1?end_time+2)

Facebook 将返回三 (3) 个单独的读数,大概是为了让您可以发现/查看非常本地化的趋势(例如,“我每周的印象是否在上升?”)或者可能是因为您错过了测量并希望获得每天的值.

具体回答你的问题:

  • 从 2012-01-01 到 2012-01-08 中午 12:00* 的 7 天内有 1,116 次展示。
  • 从 2012 年 1 月 2 日到 2012 年 1 月 9 日凌晨 12:00* 的 7 天内有 1,171 次展示。
  • 从 2012 年 1 月 3 日到 2012 年 1 月 10 日凌晨 12:00* 的 7 天内有 1,175 次展示。

    • 如下所述,end_time 本身始终是 PDT 的午夜。因此,end_time 为 2012-01-08 实际上意味着测量在前一天晚上停止,即 2012-01-07 晚上 11:59 后 1 分钟。

来自 https://developers.facebook.com/docs/reference/fql/insights/ :

The end of the period during which the metrics were collected, expressed as a UNIX time (which should always be midnight, Pacific Daylight Time) or using the function end_time_date() which takes a date string in 'YYYY-MM-DD' format. Note: If the UNIX time provided is not midnight, Pacific Daylight Time, your query may return an empty resultset. Example: To obtain data for the 24-hour period starting on September 15th at 00:00 (i.e. 12:00 midnight) and ending on September 16th at 00:00 (i.e. 12:00 midnight), specify 1284620400 as the end_time and 86400 as the period. Note: end_time should not be specified when querying lifetime metrics.

关于facebook - 无法理解 Facebook Insights API 返回的值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8842630/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com