我正在处理我需要邀请 facebook 朋友但通知未在 facebook 帐户中发送的项目。
NSString *frindId=[[self.checkitem1 objectAtIndex:indexPath.row]valueForKey:@"id"];
NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
@"Come check out my app.", @"message",
frindId, @"to",
nil];
[FBWebDialogs presentRequestsDialogModallyWithSession:nil message:[NSString stringWithFormat:@"Come check out my app."]
title:@"MyWorkOut"
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.");
}
}
}
];
我已经为使用 Facebook sdk 邀请朋友完成了上述代码。他们是使用 facebook sdk 邀请朋友的任何解决方案吗