Facebook FQL find all events that take place at a certain venue

后端 未结 1 1246
太阳男子
太阳男子 2020-12-20 03:40

I am currently making an app that lists events in a city. I only want events that happen in certain venues to be included. Since the events are all created by many different

相关标签:
1条回答
  • 2020-12-20 03:52

    This is not possible, because the venue name itself is not an indexable field, although it's marked as one in the docs (see https://developers.facebook.com/docs/reference/fql/event/).

    I found a workaround which is a little complicated, but it seems to work:

    select eid,name,description,start_time from event where eid in (SELECT eid FROM event WHERE contains("{YOUR_LOCATION_NAME}")) and venue.id = {YOUR_LOCATION_ID} and start_time > now() order by start_time ASC
    

    So, what you need to do first to be able to use this is to make a "list" of locations with their names and id, and query each location one by one. Thereby, you can make use of the Batch Query functionality of the Graph API (https://developers.facebook.com/docs/graph-api/making-multiple-requests/#simple).

    0 讨论(0)
提交回复
热议问题