List Facebook Page events on website for a Venue using FQL or Graph API

3.2k Views Asked by At

I am helping out a friend with a site for a venue that lists all events on FB with a location, ticket URI, time, etc.

I have found lots of info on how to get the data, but what I am unclear on is how to get public events without being logged in to FB.

What type of tokens do I need to have a website simply pull events data and display it to visitors?

Basically, what I am attempting to do is show a set number of upcoming events and assume that the visitors to the site are not logged in to FB.

On this page, https://developers.facebook.com/docs/reference/fql/event, it says this:

Permissions

To read the event table you need:

a generic access_token for public events (those whose privacy is set to OPEN)

a user access_token with user_events permission for a user who can see the event for non-public events

an app access_token with user_events permission (for non-public events, must be the app that created the event)

a page access_token with user_events permission (for non-public events, must be the page that created the event)

I am not looking to get help with the code really, I am just having trouble figuring out how the access/auth process works.

It appears FQL may be the best option so I can do queries based on date ranges, but alas, I am stuck on the access/auth/token part.

What do I need to have in place to be able to list a Page's events on a 3rd party site?

If anyone has any advice there, I would appreciate it. Thanks.

2

There are 2 best solutions below

0
On BEST ANSWER

I figured it out.

This question helped, but was not correct and there is a syntax error in an answer: Get Facebook events from public fan page

From what I found, you need to become an FB developer, create an app, get an ID and secret.

Use the SDK (PHP in my case), and this question had a good example of returning the list I want: Link from ticket_uri is opening a blank page

I am having the same issue though of getting blank pages on the ticket link if the user is not logged into FB.

But my original issue is solved.

0
On

Just to explain to others, you cannot get ALL the events in the city by graph search. You need to refine it either by user details or some other metric.