确实可以使用基于位置的“搜索”接收事件为此,您需要要搜索的位置的经度和纬度坐标以及具有 user_events 权限的 access_token(我认为您也可以使用公共搜索)
这是一个 FQL 示例,您如何获取某个位置附近的所有事件。(从您和您的朋友活动中搜索):
$lat = "40";
$long = "30";
// using offset gives us a "square" on the map from where to search the events
$offset = 0.4;
$events = 'SELECT pic_big, name, venue, location, start_time, eid FROM event WHERE eid IN (SELECT eid FROM event_member WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me()) AND start_time > '. $created_time .' OR uid = me()) AND start_time > '. $created_time .' AND venue.longitude < \''. ($long+$offset) .'\' AND venue.latitude < \''. ($lat+$offset) .'\' AND venue.longitude > \''. ($long-$offset) .'\' AND venue.latitude > \''. ($lat-$offset) .'\' ORDER BY start_time ASC '. $limit;
诀窍本身在于场地.经度和场地.纬度的使用。要从城市获取事件,只需获取城市坐标并根据需要调整偏移量。如果您不知道如何使用 FQL,请查看Facebook PHP SDK