私はsdk 3.1を使用していて、friendpickercontrollerを使用しようとしていますが、どういうわけかテーブルがアプリに空でロードされています。
これは私のコードです。理由についてヒントをいただけますか?
ありがとう
- (void) loadFacebookFriendsPicker:(UINavigationController *)senderNavigationController {
if (!FBSession.activeSession.isOpen) {
// if the session is closed, then we open it here, and establish a handler for state changes
[FBSession.activeSession openWithCompletionHandler:^(FBSession *session,
FBSessionState state,
NSError *error) {
switch (state) {
case FBSessionStateClosedLoginFailed:
{
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Error"
message:error.localizedDescription
delegate:nil
cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[alertView show];
}
break;
default:
break;
}
}];
}
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];
[senderNavigationController pushViewController:self.friendPickerController animated:YES];
}