I try to login user to my app with the following permissions:
NSArray* permissions = [[NSArray alloc] initWithObjects:@"email", @"read_friendlists", @"user_friends", nil];
After login I don't get "read_friendlists" permission from
[FBRequestConnection startWithGraphPath:@"/me/permissions"....];
request.
I think this is the reason, why I can't get the full friend list.
I tried to get the list with the following methods:
[FBRequestConnection startWithGraphPath:@"me/friends"
parameters:nil
HTTPMethod:@"GET"
completionHandler:^(
FBRequestConnection *connection,
id result,
NSError *error
) {
NSLog(@"FriendList: %@", result);
/* handle the result */
}];
AND
FBRequest* friendsRequest = [FBRequest requestForMyFriends];
[friendsRequest startWithCompletionHandler: ^(FBRequestConnection *connection,
NSDictionary* result,
NSError *error) {
NSArray* friends = [result objectForKey:@"data"];
NSLog(@"Found: %i friends", friends.count);
for (NSDictionary<FBGraphUser>* friendIns in friends) {
NSLog(@"I have a friend named %@ with id %@", friendIns.name, friendIns.id);
}
}];
These methods give me the friends, who also use my app, and not the whole friend list. What's wrong with my method(s)? How to get the full friend list from user?