-(IBAction)btnFacebookClick:(id)sender
{
NSArray *permissions = [[NSArray alloc] initWithObjects: @"user_about_me,user_birthday,user_hometown,user_location,email",@"read_mailbox",@"read_stream",nil];
[FBSession openActiveSessionWithReadPermissions:permissions allowLoginUI:YES completionHandler:^(FBSession *session,FBSessionState status,NSError *error)
{
if(error)
{
NSLog(@"session error %@",error);
}
else if(FB_ISSESSIONOPENWITHSTATE(status))
{
[self getFriendList];
}
}];
}
-(void)getFriendList
{
FBRequest *friendsRequest=[FBRequest requestForMyFriends];
[friendsRequest startWithCompletionHandler:^(FBRequestConnection *connection,NSDictionary* result,NSError *error)
{
friendsArr = [result objectForKey:@"data"];
NSLog(@"friends description :%@",[friendsArr description]);
}];
}
仍然是一樣的錯誤 –