Is there any way to fetch all Facebook events in a specific city?
Asked Answered
B

4

23

Can I fetch all Facebook events in a specific city? All I need is event IDs nothing else. It should be all events (public), not only someone's events. Will Facebook let us fetch that info?

Babi answered 16/11, 2012 at 3:4 Comment(2)
the website allevents.in has exactly what you are looking for. Has anyone any idea how they managed to do this?Pagepageant
It works exactly the same way as elmcity. See here: #11181980Whimsical
A
12

Elmcity does a simple search for a keyword in the event title. Try "Lancaster" for example. You'll get events in the UK, PA, NY OH and CA. You can also search for a non-location based word in the title like "picnic" and the script returns events.

You can try to query for events by location. With the graph API use the "Center" parameter in a search query:

https://graph.facebook.com/search?q=*&type=event&center=37.76,-122.427&distance=1000

Run the query in FB explorer tool.

There is no way to query events via FQL by location.

The maximum distance is 50000 and is expressed in meters. There are limits to the number of records that are returned but you can use paging to retrieve further events.

As of writing this (Jun 2015), facebook silently ignores the center parameter.


the source come from this post: Source Post

Adamantine answered 1/2, 2013 at 19:53 Comment(1)
The above queries will not return events. They are "place" queries, so you'll get things like local businesses, landmarks etc. Event queries by location have been deprecated since API 2.0 and there's currently no workaround.Whorehouse
S
5

You cannot query the event table without specifying an indexable column, i.e. an actual event Id. You could use the search functionality and query for event types, e.g.

http://graph.facebook.com/search?q=Dublin&type=event
http://graph.facebook.com/search?q=London&type=event

Once you get these results you could then further filter out these by timezone and location.

Scouting answered 16/11, 2012 at 10:3 Comment(1)
Events returned by these queries are not ordered. And there is no way to further filter them by creation date.Mitis
W
5

While you can search for places or events near a place using the Facebook Graph API, I find this unreliable. Facebook does not expose standard categories to the API that allow you to filter on these, and there is no way that I am aware of to effectively search for venues that host events near an area and order them by relevance to what you are really looking for.

In practice, that means you can search for venues near a point. The Facebook API returns every coffee house that has an open mic night, but not an arena that hosts concerts.

Were I going to do this, I'd use this workflow:

  • Query the Factual Places API to find the target venues for your search in the city of interest.
  • Pass the result of that through the Factual Crosswalk API to get the Facebook IDs of those places, and concatenate them into an array.
  • Use that array to query the Facebook Graph API for events at those places.
Whimsical answered 2/2, 2013 at 19:51 Comment(1)
This was made in September 2015 to do just that: github.com/tobilg/facebook-events-by-locationBechuana
P
0

Facebook search documentation implies that you can do a search for "objects" based on a location. For example you should be able to do https://graph.facebook.com/search?type=location&place=45386717890&distance=1000 to get a list of objects (including events) that are within 1000 (miles? km? they don't bother saying) of New York City (object #45386717890). However, I only ever get a blank result regardless of what I search near.

I'm guessing this feature is broken.

Pedanticism answered 1/2, 2013 at 18:58 Comment(2)
I just got this error while experimenting: "You are requesting too many tiles! Is your box too thin?" XDPedanticism
today you would receive this: "message": "(#12) location search is deprecated for versions v2.0 and higher"Allowed

© 2022 - 2024 — McMap. All rights reserved.