2

Facebookの友達を招待する必要があるプロジェクトに取り組んでいますが、Facebookアカウントで通知が送信されません。

    NSString *frindId=[[self.checkitem1 objectAtIndex:indexPath.row]valueForKey:@"id"];
    NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                               @"Come check out my app.",  @"message",
                               frindId, @"to",
                               nil];


    [FBWebDialogs presentRequestsDialogModallyWithSession:nil message:[NSString stringWithFormat:@"Come check out my app."]
                                                              title:@"MyWorkOut"
                                                              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.");
                                                                     }
                                                                }
                                                               }
     ];

Facebook SDKを使用して友人を招待するための上記のコードを実行しました。Facebook SDKを使用して友人を招待するためのソリューションはありますか

4

1 に答える 1

2

invitable_friends はゲームでのみ使用でき、user_friends パーミッションが必要です。詳細については、次を参照してください。

https://developers.facebook.com/docs/graph-api/reference/user/invitable_friends/

于 2015-06-09T17:29:59.680 に答える