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

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-29 12:38:21

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).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!