I am trying to retrieve a list of a user's Facebook friends by using the code
[FBRequestConnection startWithGraphPath:@"/me/friends"
parameters:nil HTTPMethod:@"GET"
completionHandler:^(
FBRequestConnection *connection,
id result,
NSError *error
) {
NSArray* friends = [result objectForKey:@"data"];
NSLog(@"Found: %i friends", friends.count);
for (NSDictionary<FBGraphUser>* friend in friends) {
NSLog(@"I have a friend named %@ with id %@", friend.name, friend.id);
}
}];
But whenever I use that code it just returns Found: 0 friends. I'm putting it inside the Viewcontroller to execute after the user logs in through Facebook. I already requested user_friends permissions and I have a friend who is signed up on the app. If it makes any difference the app is also using Quickblox SDK so if there's any way to do it with that that'd be great!