问题 : facebook分享图片时,应用跳到fb客户端,随后闪退,下方打印提示"[core] isAvailableForServiceType: for com.apple.social.facebook returning NO"
排查原因 : 数据类型没传对,应传UIimage,传了nsdata
FBSDKSharePhoto *onlyPhoto = [FBSDKSharePhoto photoWithImage:[UIImage imageWithData:imageData] userGenerated:YES]; //photoWithImage传入非uiimage类型唤起fb失败
FBSDKSharePhotoContent *photoContent = [[FBSDKSharePhotoContent alloc] init];
photoContent.photos = @[onlyPhoto];
dialog.shareContent = photoContent;
dialog.mode = FBSDKShareDialogModeShareSheet;
网友评论