【问题标题】:Facebook invite people for my app from user friend listFacebook 邀请用户好友列表中的人加入我的应用程序
【发布时间】:2015-03-03 06:17:51
【问题描述】:

我正在使用来自 facebook 的 ios 好友请求对话框向用户发送我的应用程序的邀请。在 facebook 宣布关闭他们的 API 后它停止工作,有没有人知道如何邀请人们申请 ios。

【问题讨论】:

标签: ios iphone facebook facebook-graph-api ios7


【解决方案1】:

您可以使用此代码。

- (void)inviteFriendsOfFacebook
{
    NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:[mArrTempSelected componentsJoinedByString:@","], @"suggestions", nil];

    [FBWebDialogs presentRequestsDialogModallyWithSession:nil
                                                  message:textView.text
                                                    title:nil
                                               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
                                                          {
                                                              [Helper showAlertForMessage:@"Invitation Sent Successfully." title:nil cancelButton:@"Ok" otherButton:nil andDelegate:nil withTag:0];

                                                          }

                                                      }}];

}

【讨论】:

  • 我使用过相同的...但现在它不会向用户发送请求。请检查并确认您的代码...并检查该人是否收到请求。
  • 是的,我已经用相同的代码测试了它,并且成功发送了邀请。但它没有在网络上显示,它只是在一段时间后才在 iOS 设备上显示。
【解决方案2】:

Facebook 已宣布这将仅适用于游戏应用程序,但可以做到这一点。只需在 Facebook 应用程序上设置应用程序的画布 url 并使用 faecbook 请求对话框。这对于任何应用程序来说都是非常有用的功能。Facebook 正在努力开发此功能以便轻松使用。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-05-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多