IOS Facebook Friend Invite Not Working in facebook

2019-07-20 13:47发布

i m working on project where i require invite facebook friend but notification is not sent in facebook account.

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

i have done above code for invite friend using Facebook sdk. is their any solution for inviting friend using facebook sdk

1条回答
一夜七次
2楼-- · 2019-07-20 14:15

invitable_friends only available to Games, and requires the user_friends permission. For more details visit

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

查看更多
登录 后发表回答