IOS Facebook Friend Invite Not Working in facebook sdk

旧巷老猫 提交于 2019-12-11 02:28:10

问题


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:


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/



来源:https://stackoverflow.com/questions/30522145/ios-facebook-friend-invite-not-working-in-facebook-sdk

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!