¿Cómo search amigos de Facebook en ios 6?

Quiero enviar amigos invitar a Facebook desde mi aplicación como hacerlo en la aplicación de Instagram.

Pero no puedo encontrar ningún buen tutorial para eso.

Pude get el nombre y el id del amigo, pero no puedo get la url para la image del perfil, el nombre, etc. para los amigos

Mi código es el siguiente:

NSURL *requestURL = [NSURL URLWithString:@"https://graph.facebook.com/me/friends"]; SLRequest *request = [SLRequest requestForServiceType:SLServiceTypeFacebook requestMethod:SLRequestMethodGET URL:requestURL parameters:nil]; request.account = self.facebookAccount; [request performRequestWithHandler:^(NSData *data, NSHTTPURLResponse *response, NSError *error) { if(!error) { list =[NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:&error]; NSLog(@"Dictionary contains data: %@", list ); if([list objectForKey:@"error"]!=nil) { [self attemptRenewCnetworkingentials]; } dispatch_async(dispatch_get_main_queue(),^{ nameLabel.text = [list objectForKey:@"username"]; }); } else{ //handle error gracefully NSLog(@"error from get%@",error); //attempt to revalidate cnetworkingentials } }]; 

Entonces, ¿cómo puedo lograr esto?

Este es el código para search la list de amigos.

  ACAccountStore *accountStore = [[ACAccountStore alloc] init]; __block ACAccount *facebookAccount = nil; ACAccountType *facebookAccountType = [accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierFacebook]; // Specify App ID and permissions NSDictionary *options = @{ ACFacebookAppIdKey: @"add_here_your_project_FB_ID", ACFacebookPermissionsKey: @[@"publish_stream", @"publish_actions",@"read_friendlists"], ACFacebookAudienceKey: ACFacebookAudienceFriends }; [accountStore requestAccessToAccountsWithType:facebookAccountType options:options completion:^(BOOL granted, NSError *error) { if (granted) { NSArray *accounts = [accountStore accountsWithAccountType:facebookAccountType]; facebookAccount = [accounts lastObject]; } else { NSLog(@"error.localizedDescription======= %@", error.localizedDescription); } }]; NSArray *accounts = [accountStore accountsWithAccountType:facebookAccountType]; facebookAccount = [accounts lastObject]; //NSString *acessToken = [NSString stringWithFormat:@"%@",facebookAccount.cnetworkingential.oauthToken]; //NSDictionary *parameters = @{@"access_token": acessToken}; NSDictionary *param=[NSDictionary dictionaryWithObjectsAndKeys:@"picture,id,name,link,gender,last_name,first_name,username",@"fields", nil]; NSURL *feedURL = [NSURL URLWithString:@"https://graph.facebook.com/me/friends"]; SLRequest *feedRequest = [SLRequest requestForServiceType:SLServiceTypeFacebook requestMethod:SLRequestMethodGET URL:feedURL parameters:param]; feedRequest.account = facebookAccount; [feedRequest performRequestWithHandler:^(NSData *responseData, NSHTTPURLResponse *urlResponse, NSError *error) { if(!error) { id json =[NSJSONSerialization JSONObjectWithData:responseData options:kNilOptions error:&error]; NSLog(@"Dictionary contains data: %@", json ); if([json objectForKey:@"error"]!=nil) { //[self attemptRenewCnetworkingentials]; } dispatch_async(dispatch_get_main_queue(),^{ //nameLabel.text = [json objectForKey:@"username"]; }); } else{ //handle error gracefully NSLog(@"error from get%@",error); //attempt to revalidate cnetworkingentials } }]; 

Espero que esto te ayude. Gracias

deberías include esto en param

 [ NSMutableDictionary dictionaryWithObjectsAndKeys:@"picture,id,name,link,gender,last_name,first_name",@"fields",nil]