OGeek|极客世界-中国程序员成长平台

标题: IOS Facebook好友邀请在facebook sdk中不起作用 [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-12 15:22
标题: IOS Facebook好友邀请在facebook sdk中不起作用

我正在做一个项目,我需要邀请 facebook friend ,但通知未在 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 邀请 friend 完成了上述代码。他们是使用 facebook sdk 邀请 friend 的任何解决方案吗



Best Answer-推荐答案


invitable_friends 仅适用于游戏,并且需要 user_friends 权限。 欲了解更多详情,请访问

https://developers.facebook.com/docs/graph-api/reference/user/invitable_friends/

关于IOS Facebook好友邀请在facebook sdk中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30522145/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://ogeek.cn/) Powered by Discuz! X3.4