【问题标题】:Facebook App Request not being sent in iOSFacebook 应用请求未在 iOS 中发送
【发布时间】:2012-11-19 11:12:12
【问题描述】:

我已将我的应用设置为发送 Facebook 应用请求。我得到弹出屏幕来选择朋友,当我点击发送按钮时,弹出窗口消失了。我还在控制台中打印了一个请求 ID。

虽然我选择发送请求的朋友没有收到应用请求。

我有 facebook sdk 3.1,它适用于其他活动,例如发布到用户的墙上等。

【问题讨论】:

    标签: ios facebook request


    【解决方案1】:

    可能的重复:

    第二个链接上的answer 提供了有关如何解决此问题的分步过程。

    【讨论】:

      【解决方案2】:

      确保您的 Facebook 应用程序 ID 在开发人员页面和 xcode 中的信息下相同,启用沙盒模式并且必须在开发人员页面中填写画布 url [在 facebook 类别下的应用程序]。

      NSString *facebookID = @"Your friend facebook id";
          NSMutableDictionary* params =
          [NSMutableDictionary dictionaryWithObject:facebookID forKey:@"to"];
      
          NSString *message = @"SOME_MESSAGE";
          NSString *title = @"TITLE";
      
          [FBWebDialogs presentRequestsDialogModallyWithSession:nil
                        message: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
                          {
                              NSLog(@"Request Sent. %@", params);
                          }
              }}];
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2015-09-05
        • 2013-04-14
        • 1970-01-01
        • 2012-11-14
        • 2012-11-06
        • 1970-01-01
        相关资源
        最近更新 更多