Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Import Facebook friends using custom UI in iOS

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 230
    Comment on it

    Facebook friend list import became easier after using latest Facebook SDK. Here is the method which imports friend list.

    NSMutableArray *arrfriendList = [[NSMutableArray alloc]init];
    [FBRequestConnection startForMyFriendsWithCompletionHandler:^(FBRequestConnection *connection, id result, NSError *error){
                              if (!error){
                                  // These are the current permissions the user has
                                  NSLog(@"Friends ===>> %@", result);
                                 arrfriendList =[result valueForKey:@"data"];
    
                              } else {
                                  // An error occurred, we need to handle the error
                                  // Check out our error handling guide:
                                  NSLog(@"%@",[NSString stringWithFormat:@"error %@", error.description]);
                              }
                          }];
    

    For more help see the attached sample code.

    Happy Coding ...!!!

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: