我正在开展项目,我需要邀请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邀请朋友的任何解决方案
答案 0 :(得分:2)
invitable_friends仅适用于Games,并且需要user_friends权限。 有关详细信息,请访问
https://developers.facebook.com/docs/graph-api/reference/user/invitable_friends/