我可以page_fan_adds
使用 FQL 获取特定日期的值。
SELECT metric, value FROM insights WHERE object_id = XXX AND
metric = "page_fan_adds" AND end_time = end_time_date("2012-07-20") AND
period = period("day")
我得到:
{"data": [
{"metric": "page_fan_adds",
"value": 1}
]}
但是,使用 Graph API,我可以获取为期一个月的数据:graph.facebook.com/XXX/insights/page_fan_adds/?since= 1340175600&until=1342767600
. 我得到:
{"data": [
{"id": "XXX/insights/page_fan_adds/day",
"name": "page_fan_adds",
"period": "day",
"values": [
{"value": 4,
"end_time": "2012-06-21T07:00:00+0000"},
{"value": 2,
"end_time": "2012-07-20T07:00:00+0000"}
],
"title": "Daily New Likes",
"description": "Daily The number of new people who have liked your Page (Total Count)"}],
"paging": {
"previous": "https://graph.facebook.com/XXX/insights/page_fan_adds/?since=1337583600&until=%201340175600",
"next": "https://graph.facebook.com/XXX/insights/page_fan_adds/?since=1342767600&until=1345359600"
}
}
period
列只能是day
for page_fan_adds
。那么如何使用 FQL 获取一个月的数据呢?