FBSDKShareDialog not working on IOS11

血红的双手。 提交于 2019-12-24 05:57:43

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!