【问题标题】:IOS fb invites sent but not shown on users wallIOS fb邀请已发送但未显示在用户墙上
【发布时间】:2013-04-15 06:33:05
【问题描述】:

我正在从我的应用程序向 fb 朋友发送请求,但我没有在我发送请求的 fb 用户的墙上收到任何通知?

我正在使用 FB SDK 3.2(我希望它是最新的)

以下是我用来发送请求的代码

NSMutableDictionary* params =   [NSMutableDictionary dictionaryWithObjectsAndKeys:
                                     friendList, @"to",
                                     nil];
    [FBWebDialogs presentRequestsDialogModallyWithSession:nil
        message:[NSString stringWithFormat:@"I just smashed %d friends! Can you beat it?", 15]
        title:@"Total Smashed Score"
        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.");
                }
            }
        }
     ];

请求对话框正确显示,当我单击发送按钮时,邀请已发送但未显示在用户墙上。我们将不胜感激任何类型的帮助。

问候。

【问题讨论】:

  • 你好哥们我也有同样的问题,你有没有回答,如果是,那么请分享它
  • 嘿兄弟,你的问题是怎么解决的??
  • @Quality Coder - 我已经发布了我的解决方案,你可以测试一下。
  • 你是怎么得到这个friendList的。

标签: ios facebook-graph-api apprequests facebook-app-requests facebook-invite


【解决方案1】:

邀请永远不会显示在用户的墙上/时间轴上。只有他们被发送到的用户才能私下查看。将显示在Requests page 上或作为通知用户。

【讨论】:

    【解决方案2】:

    这是我的解决方案

    //friendlist = NSString of fb id's
    
    NSMutableDictionary* params =   [NSMutableDictionary dictionaryWithObjectsAndKeys:
                                         friendList, @"to",
                                         nil];
        [FBWebDialogs presentRequestsDialogModallyWithSession:nil
            message:[NSString stringWithFormat:@"message!"]
            title:@"title"
            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 {
                        NSDictionary *urlParams = [self parseURLParams:[resultURL query]];
                        if (![urlParams valueForKey:@"request"]) {
                            // User clicked the Cancel button
                            NSLog(@"User clicked cancel button.");
                        } else {
                            nslog("succesfully sent invites");
                        }
                    }
                }
            }
         ];
    

    【讨论】:

    • 我不知道前一个代码和最后一个代码之间有什么变化,但是第一个代码不起作用,而这个代码就像魅力一样 :)
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-04-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-05
    • 1970-01-01
    相关资源
    最近更新 更多