0

我正在尝试使用 Facebook iOS SDK 向我的 FB 朋友发送评论。

    NSMutableDictionary* params =   [NSMutableDictionary dictionaryWithObjectsAndKeys:[[_usersFB valueForKey:@"selectValue"] componentsJoinedByString:@","], @"to",
                                                 nil];


[FBWebDialogs
                      presentRequestsDialogModallyWithSession:nil
                      message:@"Test Comment"
                      title:nil
                      parameters:params
                      handler:^(FBWebDialogResult result, NSURL *resultURL, NSError *error) {
                          if (error) {
                              // Error launching the dialog or sending the request.
                              NSLog(@"Error sending request.");

                          } else {
                              if (result == FBWebDialogResultDialogNotCompleted) {
                                  // User clicked the "x" icon
                                  NSLog(@"User canceled request.");
                              } else {
                                  // Handle the send request callback
                              }
                          }
                      }];

我正在使用 FB SDK v3.5.3。

我在 FBDialog 中看到所有朋友,但是当我点击发送按钮时,回调不会返回错误,假设它有效但我选择的朋友没有收到任何东西。

仅供参考 - 我的 FB 应用程序未处于沙盒模式。

任何指针将不胜感激。

干杯

4

1 回答 1

0

当您检查它是否有效时,请确保您在 iPhone 设备中打开 Facebook 页面或应用程序。

通知不会出现在桌面浏览器上的 facebook 上,只会出现在 iPhone 上。

我希望它有所帮助。

于 2014-04-16T14:25:37.707 回答