iOS - Facebook SDK方法presentRequestsDialogModallyWithSession未显示请求预览

时间:2013-09-09 17:33:05

标签: ios facebook facebook-ios-sdk

我已经实现了基本功能,可以向玩家的朋友发送邀请请求,以便在iOS设备上玩我的游戏应用。

我已按照此处的说明操作:https://developers.facebook.com/docs/ios/ios-sdk-games/requests/

一切正常,我可以发送请求和朋友接收通知。问题是我无法得到请求对话框出现的方式显示在上面的链接中,特别是我无法在对话框中获取请求的预览。这取决于SDK版本吗?我目前正在使用SDK 3.5.3版本。或问题出在其他地方?任何帮助是极大的赞赏。感谢

以下是调用函数的代码:

NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:nil];
[FBWebDialogs presentRequestsDialogModallyWithSession:nil message:[NSString stringWithFormat:@"Come and play CSR with me!"]
              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 {
                          NSLog(@"Request Sent.");
                      }
                  }}];

0 个答案:

没有答案