Search code examples
phpfacebookfacebook-graph-apifacebook-fql

Get events from Facebook group


I'm developing a website for an association. The website would show the Facebook events with the help of Facebook's open API.

I have managed to do this with the events of a Facebook page, but I'm running into problems with a group. With a page, I have used this code and it works fine. However, groups work a bit different because the group is not an event member.

$fql = "SELECT name, pic, start_time, end_time, location, description 
        FROM event WHERE eid IN ( 
            SELECT eid FROM event_member WHERE uid = 221167777906963) 
        ORDER BY start_time asc";

Any help on making the query to get the events of a certain group?


Solution

  • As you said, we can't use the event_member table with groups. It looks like not possible to get the events of a group with FQL.

    Luckily, it works using the Graph API:

    http://graph.facebook.com/221167777906963/events