Ok, so I found a solution to my problem ... The only way to achieve what I want is through FQL. Basically, these are cross-references of your friends with participants, but on Facebook servers, and you only get the data that you request (in my case, user ID, name, image). I did not understand how to set the limit and offset, but I do not require this, and I think it is possible through FQL ...
Here is my code:
-(void)getFriendsAttending{ NSLog(@"getting friends"); NSString *fql = [NSString stringWithFormat:@"SELECT uid, name, pic FROM user WHERE uid IN (SELECT uid FROM event_member WHERE eid = %@ AND rsvp_status = 'attending' AND uid IN (SELECT uid2 FROM friend WHERE uid1 = me()))", fbID]; NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObject:fql forKey:@"q"]; [FBRequestConnection startWithGraphPath:@"/fql" parameters:params HTTPMethod:@"GET" completionHandler:^(FBRequestConnection *connection, id result, NSError *error) { if (error) { NSLog(@"Error: %@", [error localizedDescription]); } else { NSLog(@"Friends at event %@: %@", fbID, result); } }]; }
And here is a clean FQL query for clarity (123456789 is the event identifier):
SELECT uid, name, pic FROM user WHERE uid IN (SELECT uid FROM event_member WHERE eid = 123456789 AND rsvp_status = 'attending' AND uid IN (SELECT uid2 FROM friend WHERE uid1 = me()))
source share