I have implement facebook app invite functionality by using following code. But my app is getting crash due to undefined selector error. I have try to debug or search this type of error on google But unable to find any clue.
FBSDKAppInviteContent *content =[[FBSDKAppInviteContent alloc] init];
content.appLinkURL = contentURL;
//optionally set previewImageURL
//content.appInvitePreviewImageURL = [NSURL URLWithString:imgUrl];
[FBSDKAppInviteDialog showWithContent:content
delegate:nil];
//--Error is coming as following
-[FBSDKApplicationDelegate openBridgeAPIRequest:completionBlock:]: unrecognized selector sent to instance 0x16da1250 * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[FBSDKApplicationDelegate openBridgeAPIRequest:completionBlock:]: unrecognized selector sent to instance 0x16da1250' * First throw call stack: (0x28232fef 0x36b76c8b 0x28238409 0x28236327 0x28165e78 0x15d491 0x15d1c1 0x114aa9 0x2b8e0ddb 0x2b8e0d81 0x2b8cb973 0x2b8e07ed 0x2b8e04c7 0x2b8d9da1 0x2b8aff95 0x2bb268ab 0x2b8ae9a9 0x281f8faf 0x281f83bf 0x281f6a25 0x28143201 0x28143013 0x2fc14201 0x2b90fa09 0xd0ca1 0x37128aaf) libc++abi.dylib: terminating with uncaught exception of type NSException
Thanks in advance, It's really appreciated if any one give any clue on this.
You should use
[FBSDKAppInviteDialog showFromViewController:viewController withContent:content delegate:weakSelf];
showWithContent:delegate is already deprecated.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.