过去两年某特定地点的所有Facebook活动清单 [英] List of all facebook events in a given location in the last two years
问题描述
我想要做的
我正在尝试提取所有公开 Facebook事件列表在2012年和2013年,在一个给定的城市发生了这种情况。此外,对于每个人,我想提取以下内容:
I am trying to extract a list of all public facebook events that have happened in a given city in 2012 and 2013. Furthermore for each of them, I want to extract the following:
- 事件名称
- 事件描述
- 日期
- 位置
- 人数参加/可能/拒绝
- event name
- event description
- date
- location
- number of people on attending/maybe/declined
我迄今为止尝试过的
我在图形资源管理器中尝试过以下查询
I have been trying the following query in graph explorer
search?q={Oslo}& [type={event}](#searchtypes)
我现在忽略了日期范围约束。我想我可以稍后解决。
I have ignored the date range constraint for now. I figure that I can fix that later.
问题
列出状态更新(故事),地点和其他一切,并将其作为JSON对象返回。但是,这不会提供我所需要的所有数据字段。任何想法?
This is listing status updates (stories), places and everything else, and returning it as JSON objects. However, this won't provide with me with all the data fields that I require. Any ideas?
Sidenote
我已经尝试研究FQL,但显然是不能做这样的搜索? (如果可以,请随时帮助)。最接近的是:
I have tried looking into FQL but apparently that cannot do a search like this? (If it can, feel free to help out). The closest I got was this:
SELECT eid FROM event_member WHERE uid IN
(SELECT page_id FROM place WHERE
distance(latitude, longitude, "37.76", "-122.427") < 1000)
但这只会给我未来的事件。也许如果它允许我过去看过?
But this only gives me events in the future. Maybe if it allowed me to look in the past too?
推荐答案
看起来FQL可以给你所需的结果。
这个FQL(这是你开始的扩展)将会显示2012到2013年之间的所有事件以及你想要的事件的数据:
Looks like FQL can give you the desired result. This FQL (which is extension to what you started) will show you all events between 2012 and 2013 with the data about the event you wanted:
select
eid,
name,
description,
location,
all_members_count,
attending_count,
unsure_count,
not_replied_count,
declined_count,
start_time,
end_time,
venue
from
event
where
eid in
(
select
eid,
start_time
from
event_member
where
uid in
(
select
page_id
from
place
where
distance(latitude, longitude, "37.76", "-122.427") < 1000
) and
start_time > "2012-01-01"
) and
end_time < "2013-01-01" and
end_time <> 'null'
这是我运行此查询的结果之一:
And this how one of the results I got for running this query:
{
"eid": 170775033066718,
"name": "Lavender Diamond at The Chapel - Dec 11",
"description": "Get tickets: http://ticketf.ly/SUb4w9\nDetails: http://www.thechapelsf.com/event/184715/\n\nVERY SPECIAL GUEST WILL BE ANNOUNCED DAY OF SHOW",
"location": "The Chapel",
"all_members_count": 92,
"attending_count": 30,
"unsure_count": 3,
"not_replied_count": 59,
"declined_count": 4,
"start_time": "2012-12-11T20:00:00",
"end_time": "2012-12-12T00:00:00",
"venue": {
"street": "",
"city": "",
"state": "",
"country": "",
"latitude": 37.760503799154,
"longitude": -122.42123452518,
"id": 113634312122520
}
}
这篇关于过去两年某特定地点的所有Facebook活动清单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!