I get this error when using FBSDKLoginKit, FBSDKShareKit, to login, share link and like a link in my application. I using FBSDKLoginButton to login
@property (nonatomic, strong) IBOutlet FBSDKLoginButton *loginButton;
- (void)viewDidLoad {
[super viewDidLoad];
self.loginButton.publishPermissions = @[@"publish_actions"];
}
Using FBSDKShareKit to share:
- (FBSDKShareDialog *)getShareDialogWithContentURL:(FBSDKShareLinkContent *)content
{
FBSDKShareDialog *shareDialog = [[FBSDKShareDialog alloc] init];
shareDialog.shareContent = content;
return shareDialog;
}
- (IBAction)ShareAppOnFB:(UIButton *)sender {
FBSDKShareLinkContent *content = [[FBSDKShareLinkContent alloc] init];
FBSDKShareDialog *facebookShareDialog = [self getShareDialogWithContentURL:content];
if ([facebookShareDialog canShow]) {
[FBSDKShareDialog showFromViewController:self.parentViewController
withContent:content
delegate:self];
}
}
Using FBSDKShareKit to Like:
FBSDKLikeButton *like = [[FBSDKLikeButton alloc] init];
like.objectID = @"";
like.frame = CGRectOffset(like.frame, 50, 100);
[self.view addSubview:like];
Everything work fine on iOS 9 and iOS 8, but when I upgrade into Xcode 8 and run on iOS 10, I get a blank page right away when tap on Login, Share and Like Button, and nothing happens after that. I tried to upgrade to Facebook SDK 4.15.1 but nothing better, this bug still happens. Anyone know how to fix this bug on iOS 10?