The Facebook friends picker only shows friends who are using the IOS app

I want to create an FBFriendPickerViewController with all friends, I know there are other posts about this, but the answer is that I have tot, instead of requesting "taggable_friends" instead of friends, but the result is the same with "taggable_friends" as with "friends ". FBFriendPickerViewController only contains friends who have installed the app. Here is my code:

 [FBSession openActiveSessionWithReadPermissions:
 [NSArray arrayWithObjects:@"user_friends",nil] allowLoginUI:YES
                              completionHandler:^(FBSession *session, FBSessionState status, NSError *error) {
                                  //YOUR CODE
                                  FBRequest* friendsRequest = [FBRequest requestWithGraphPath:@"me/taggable_friends?fields=picture,name,username,location,first_name,last_name" parameters:nil HTTPMethod:@"GET"];


                                  [friendsRequest startWithCompletionHandler: ^(FBRequestConnection *connection, NSDictionary* result, NSError *error) {
                                      //store result into facebookFriendsArray
                                      facebookFriendsArray = [result objectForKey:@"data"];
                                      [self.friendPickerController loadData];
                                  }];

                              }];

if (self.friendPickerController == nil) {
    // Create friend picker, and get data loaded into it.
    self.friendPickerController = [[FBFriendPickerViewController alloc] init];
    self.friendPickerController.title = @"Pick Friends";
    self.friendPickerController.delegate = self;
}

[self.friendPickerController loadData];
[self.friendPickerController clearSelection];

[self presentViewController:self.friendPickerController animated:YES completion:nil];

      

+3


source to share





All Articles