複数のユーザーに FB リクエストを送信できず、「エラーが発生しました。後でもう一度お試しください」というメッセージが表示され続けます。
コードは次のようになり、1 人のユーザーにのみ送信しようとすると問題なく動作します。
- (void)sendRequest:(NSArray *) targeted {
NSMutableDictionary* params =
[[NSMutableDictionary alloc]init];
if (targeted != nil && [targeted count] > 0) {
NSString *selectIDsStr = [targeted componentsJoinedByString:@","];
[params setObject:selectIDsStr forKey:@"to"];
}
// Display the requests dialog
[FBWebDialogs
presentRequestsDialogModallyWithSession:nil
message:@"Learn how to make your iOS apps social."
title:nil
parameters:params
handler:^(FBWebDialogResult result, NSURL *resultURL, NSError *error) {
if (error) {
// Error launching the dialog or sending request.
NSLog(@"Error sending request.");
} else {
if (result == FBWebDialogResultDialogNotCompleted) {
// User clicked the "x" icon
NSLog(@"User canceled request.");
} else {
// Handle the send request callback
NSDictionary *urlParams = [self parseURLParams:[resultURL query]];
if (![urlParams valueForKey:@"request"]) {
// User clicked the Cancel button
NSLog(@"User canceled request.");
} else {
// User clicked the Send button
NSString *requestID = [urlParams valueForKey:@"request"];
NSLog(@"Request ID: %@", requestID);
}
}
}
}];
}
誰もこれにアプローチする方法の手がかりを持っていますか?