如何在fb profile viewcontroller中发送请求多个朋友

时间:2014-01-02 05:38:05

标签: iphone objective-c facebook facebook-graph-api uitableview

我选择的fb id's

arryOfFBIds = [[NSMutableArray alloc] init];
for (id<FBGraphUser> user in self.friendPickerController.selection)
{
    [arryOfFBIds addObject:user.id ];
    NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
    [defaults setObject: arryOfFBIds forKey: @"SelectedFBIds"];
    [defaults synchronize];
    NSLog(@"array of fb id:%@",arryOfFBIds);
}

并在多个朋友中发送请求

NSMutableDictionary* params2 =   [NSMutableDictionary dictionaryWithObjectsAndKeys:@"Invite to on Ensmbl", @"description", @"http://placebogames.com/", @"link",[arryOfFBIds componentsJoinedByString:@","],@"to",  nil];

[FBWebDialogs presentFeedDialogModallyWithSession:[FBSession activeSession] parameters:params2  handler:^(FBWebDialogResult result, NSURL *resultURL, NSError *error)
{
     NSLog(@"error===>%@,resultURL===>%@",error,resultURL);
} ];

但它没有用。只发送了一个好友请求。 如何发送多个好友请求。

0 个答案:

没有答案