3

I want to make a FBFriendPickerViewController with all friends, I know there is other posts about it, but the answer is that I have tot put 'taggable_friends' instead of friends in request, but the result is the same with 'taggable_friends' as with 'friends'. The FBFriendPickerViewController contains only the friends who have instaled 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];
Stern Edi
  • 430
  • 6
  • 15
  • 2
    @Stem Edi check this http://stackoverflow.com/questions/24474124/fbfriendpickerviewcontroller-not-showing-all-friends/24474204#24474204 – Yatheesha Aug 25 '14 at 11:44

0 Answers0