Search code examples
iosobjective-cfbsdksharekit

FBSDKAppInviteDialog is not working


I am Implementing app to invite friend

But it gives me below error

enter image description here


Solution

  • OLD method is deprecated

    Document : https://developers.facebook.com/docs/reference/ios/current/class/FBSDKAppInviteDialog/

    New Method :

    + (instancetype)
    showFromViewController: (UIViewController *)viewController
    withContent:    (FBSDKAppInviteContent *)content
    delegate:   (id<FBSDKAppInviteDialogDelegate>)delegate;
    

    Declared In: FBSDKAppInviteDialog.h

    showWithContent:delegate:
    

    + (instancetype)
    showWithContent:    (FBSDKAppInviteContent *)content
    delegate:   (id<FBSDKAppInviteDialogDelegate>)delegate
    __attribute__((deprecated("use showFromViewController: withContent:delegate: instead")));
    Declared In: FBSDKAppInviteDialog.h