Question

I'm using the Facebook API to fetch the events created by my band on the band-page. I then show the events on the band's website so I don't have to update our shows on multiple platforms.

Using this FQL query, it works fine.

SELECT name, pic, start_time, end_time, location, description, eid, is_date_only
            FROM event 
            WHERE eid IN ( 
                SELECT eid 
                FROM event_member 
                WHERE uid = MY_PAGEUID 
                AND start_time >0
            )

On FB I filled in 'Building X', and FB gave me suggestions when I was typing. I picked the right one and saved the event.

Now, my problem is, the location field only shows the name of the building I filled in. Facebook knows where the building is, but I don't know how to get the place name the building is located in. Visitors of our website don't know where 'Building X' is.

My question is; how do I get the place name from the location?

Was it helpful?

Solution

You can use the "venue" field in the SELECT statement. It returns a structure with much more precise and detailed information.

If you go to https://developers.facebook.com/docs/reference/fql/event and click on the "venue" field you can see the structure that is being returned.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top