问题
I am using FBSDKShareDialog
to share an image on facebook, but on IOS11 it is not working. The Facebook share dialog is not opening.
How can I share the post and have it work on IOS11 and previous versions as well.
My previous working code:
FBSDKSharePhoto *photo = [[FBSDKSharePhoto alloc] init];
photo.image = img;
photo.userGenerated = YES;
FBSDKSharePhotoContent *content = [[FBSDKSharePhotoContent alloc] init];
content.photos = @[photo];
[FBSDKShareDialog showFromViewController:self withContent:content delegate:self];
回答1:
Update to the latest Facebook Frameworks.
pod 'FBSDKCoreKit', '~> 4.27.0'
pod 'FBSDKLoginKit', '~> 4.27.0'
pod 'FBSDKShareKit', '~> 4.27.0'
来源:https://stackoverflow.com/questions/46380944/fbsdksharedialog-not-working-on-ios11