FBSDKAppInviteDialog is not working

1.8k views Asked by At

I am Implementing app to invite friend

But it gives me below error

enter image description here

2

There are 2 answers

2
Ashish Kakkad On BEST ANSWER

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
0
Reinhard Männer On

App invites are no longer supported by Facebook, see here.

App Invites will no longer be supported starting with Facebook SDK version 4.28 and above. Previous versions of the SDK can still access App Invites, but starting 2/6, App Invites will no longer be supported.