IOS Facebook 好友邀请在 facebook sdk 中不起作用
IOS Facebook Friend Invite Not Working in facebook sdk
我正在做一个项目,我需要邀请 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
邀请朋友的任何解决方案吗?
invitable_friends 仅适用于游戏,并且需要 user_friends 权限。
欲了解更多详情,请访问
https://developers.facebook.com/docs/graph-api/reference/user/invitable_friends/
我正在做一个项目,我需要邀请 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
邀请朋友的任何解决方案吗?invitable_friends 仅适用于游戏,并且需要 user_friends 权限。 欲了解更多详情,请访问
https://developers.facebook.com/docs/graph-api/reference/user/invitable_friends/