我在 FB 文档上找不到任何关于此的内容,但基本上我正在寻找的是能够将多个 FacebookIds 添加到 FBWebDialogs 的参数中。这是我试图做的一个例子,但当然这是不对的:
NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
facebookID1, @"to",
facebookID2, @"to",
facebookID3, @"to",
nil];
FBFrictionlessRecipientCache *friendCache = [[FBFrictionlessRecipientCache alloc] init];
[friendCache prefetchAndCacheForSession:nil];
[FBWebDialogs presentRequestsDialogModallyWithSession:nil
message:[NSString stringWithFormat:@"هل سمعت باليومي؟ برنامج iPhone إخباري روعا"]
title:nil
parameters:params
handler:^(FBWebDialogResult result, NSURL *resultURL, NSError *error) {
if (error) {
// Case A: Error launching the dialog or sending request.
NSLog(@"Error sending request.");
} else {
if (result == FBWebDialogResultDialogNotCompleted) {
// Case B: User clicked the "x" icon
NSLog(@"User canceled request.");
} else {
NSLog(@"Request Sent. %@", error);
}
}}
friendCache:friendCache];