Search code examples
iosfacebookswiftparse-platformfacebook-ios-sdk

FBFriendPickerDelegate disappeared with Facebook v4


I recently updated my iOS app using Facebook v3 to Facebook v4 (with Parse & Parse-UI iOS).

Problem is that FBFriendPicker seemed to disappear. Did someone find how to get such feature with the new SDK for iOS ?


Solution

  • You can replace the Facebook SDK with the latest Facebook SDK 4.x and try the following code.

    FBSDKAppInviteContent *content =[[FBSDKAppInviteContent alloc] init];
    content.appLinkURL = [NSURL URLWithString:@"https://fb.me/appId"];
    
    //optionally set previewImageURL
    
    content.previewImageURL = [NSURL URLWithString:@"http://exampleurl.jpg"];
    
    // present the dialog. Assumes self implements protocol `FBSDKAppInviteDialogDelegate`
    [FBSDKAppInviteDialog showWithContent:content
                                 delegate:nil];
    

    For more detail please have a look into App Invite Through Facebook SDK

    For generate app link please check How To Generate App Link