I am using Facebook SDK 4.20 to get all friends. Currently I am using below code to get the same:
if ([FBSDKAccessToken currentAccessToken]) {
[[[FBSDKGraphRequest alloc] initWithGraphPath:@"me/friends" parameters:@{@"fields": @"name,id,uid,list_type"}] startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection, id result, NSError *error) {
if (!error) {
NSLog(@"User Profile is : %@",result);
}
}];
}
Using above code I am getting a list of only those friends who are currently using my app. I have a total of 458 friends in my friends list but using above code I am getting only 2 friends from the list who are currently using/registered with my app using Facebook.
Can anyone help me where I am going wrong? What else I can do to get all 458 friends?
I know the questions related to this is already asked on Stack Overflow but none of those are about Facebook SDK V4.20 or not related to getting all friends. The respected questions are may be about old SDKs or about getting list of the friends who are using their app.