0

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.");
                      }
                  }}];
4

0 に答える 0