I'm trying to get the user's friend list with iOS Facebook SDK 3.1 but I'm getting an empty list as a result. This is what I'm doing:
FBRequest* friendsRequest = [FBRequest requestForMyFriends];
[friendsRequest startWithCompletionHandler: ^(FBRequestConnection *connection,
NSDictionary* result,
NSError *error) {
NSArray* friends = [result objectForKey:@"data"];
for (NSDictionary<FBGraphUser>* friend in friends) {
NSLog(@"NAME %@", friend.name);
}
}];
I'm getting this:
{
data = (
); }
This app has also Facebook Login and it works OK. What am I missing?
Thanks in advance!