本文介绍了iOS Facebook朋友邀请在Facebook SDK中无法使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在从事需要邀请Facebook朋友但未在Facebook帐户中发送通知的项目.

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

我已经完成了使用Facebook sdk邀请朋友的上述代码.是他们使用facebook sdk邀请朋友的任何解决方案

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

推荐答案

invitable_friends仅适用于游戏,并且需要user_friends权限.有关更多详细信息,请访问

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/

这篇关于iOS Facebook朋友邀请在Facebook SDK中无法使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-29 00:28