IOS Facebook Friend Invite Not Working in facebook sdk

905 Views Asked by At

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

There are 1 best solutions below

0
On BEST ANSWER

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/