hey
i want to get from facebook the events that my friends are going to them. for example
- eventId1 (friend1,friend2,friend3)
- eventId2 (friend10,friend55);
and so on...
how can i accomplish it ?
thank for replays.
hey
i want to get from facebook the events that my friends are going to them. for example
and so on...
how can i accomplish it ?
thank for replays.
One way do get events is using the FQL. Here is how you can get all the events your friends are going to attend:
SELECT name FROM event WHERE eid IN (SELECT eid from event_member WHERE uid IN (SELECT uid2 FROM friend WHERE uid1=''$user_id'') )
More here:
expanding on sarfaz's answer:
use the following query for each of your friends:
SELECT name FROM event WHERE eid IN (SELECT eid from event_member WHERE uid = $friend_uid )
that will return the exact list of events that friend is attending. then, parse that list of friends and gather the events they are attending in order to create a reversed map of the data.
from my experience this FQL query takes a long time to execute, especially if you are going to be running it multiple times for each of your friends. be weary of facebook timeouts if you are using an FBML app -- otherwise you might want to batch this call.