【发布时间】:2013-10-28 18:33:00
【问题描述】:
我在 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];
【问题讨论】:
-
莫拉德,题外话,但你不应该有多个具有相同文本的键。在您的示例中,您添加了三次
@"to"。这行不通。如果您打印字典,则只有一个条目。
标签: ios xcode facebook facebook-graph-api