[英]How to share multiple post on friend's wall in objective C
I'm using facebook sdk to post on friend's wall. 我正在使用facebook sdk在朋友的墙上发帖。 I am able to post it but when i select multiple friends in FBWebDialog instead of posting two friends simultaneously for each friend a separate dialog box is shown. 我可以发布它,但是当我在FBWebDialog中选择多个朋友而不是同时为每个朋友发布两个朋友时,会显示一个单独的对话框。 How to post on multiple friend's wall . 如何在多个朋友的墙上发帖。
-(void)showFriendsList
{
friendPickerController = [[FBFriendPickerViewController alloc] init];
friendPickerController.title = @"Pick Friends";
friendPickerController.delegate = self;
[friendPickerController loadData];
}
-(IBAction)facebookShare:(UIButton *)sender
{
[friendPickerController presentModallyFromViewController:self animated:YES handler:
^(FBViewController *sender, BOOL donePressed) {
if (!donePressed)
{
return;
}
NSString* fid;
NSString* fbUserName;
for (id<FBGraphUser> user in friendPickerController.selection)
{
NSLog(@"\nuser=%@\n", user);
fid = user.id;
fbUserName = user.name;
NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:remedyLabel, @"caption", appIcon, @"picture",symptomName, @"name",remedyDescription,@"description",fid,@"tags",fid,@"to",@"106377336067638",@"place", nil];
NSLog(@"\nparams=%@\n", params);
[FBRequestConnection startWithGraphPath:[NSString stringWithFormat:@"%@/feed",fid] parameters:params HTTPMethod:@"POST" completionHandler:^(FBRequestConnection *connection,id result,NSError *error)
{
[FBWebDialogs presentFeedDialogModallyWithSession:nil parameters:params handler:^(FBWebDialogResult result, NSURL *resultURL, NSError *error)
{
if (error)
{
NSLog(@"Error publishing story.");
}
else
{
if (result == FBWebDialogResultDialogNotCompleted) {
// User clicked the "x" icon
NSLog(@"User canceled story publishing.");
}
else
{
// Handle the publish feed callback
//Tell the user that it worked.
NSLog(@"Request Sent");
}
}
}];
}];
}
}];
}
No, that's not possible. 不,那是不可能的。 You have to open separate dialog for each friend. 您必须为每个朋友打开单独的对话框。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.