我在 FB 文档中找不到任何关于此的内容,但基本上我正在寻找的是能够将多个 FacebookId 添加到 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];
最佳答案
很简单,将所有这些字符串放在一个数组中,然后params 中的对象是字符串数组,键是@"to"。
关于ios - Facebook FBWebDialogs 参数一次邀请多个 friend ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19642447/