[英]Facebook SDK share on iOS returns share was cancelled
I'm sharing to Facebook with FB share dialog like this: 我正在通过FB共享对话框与Facebook共享:
guard let localIdentifier = localIdentifier else {return}
let assetURL = "assets-library://asset/asset.MOV?id=" + localIdentifier + "&ext=MOV"
let video : FBSDKShareVideo = FBSDKShareVideo()
video.videoURL = URL(string:assetURL)
let content : FBSDKShareVideoContent = FBSDKShareVideoContent()
content.video = video
let shareDialog = FBSDKShareDialog()
shareDialog.shareContent = content
shareDialog.delegate = self
DispatchQueue.main.asyncAfter(deadline: .now() + 1.0 , execute: {
shareDialog.show()
})
I check that the url is valid. 我检查网址是否有效。 This is a local MOV file and I copy it first to the camera roll.
这是一个本地MOV文件,我首先将其复制到相机胶卷。 Then I retrieve it using PHManager and trying to share with FBSDK share dialog.
然后我使用PHManager检索它并尝试与FBSDK共享对话框共享。
The FB sharing dialog with the movie appears and I press post. 出现带有电影的FB共享对话框,然后按发布。 The FB seems processes the file and I get a V - that probably the video was shared.Afterwards I get the callback the share was cancelled.
FB似乎处理文件,我得到一个V - 可能是视频被共享。之后我得到了回调,共享被取消了。 Did somebody experience the same?
有人经历过同样的经历吗? What might be the problem?
可能是什么问题?
Thanks in advance. 提前致谢。
What version of the FacebookSDK are you using? 您使用的是什么版本的FacebookSDK? I had this problem too and it was because the version that I was using was not compatible with iOS 11 yet.
我也有这个问题,因为我使用的版本与iOS 11不兼容。 I think that from v 4.27 it's compatible, I was using v4.23.
我认为从v 4.27开始它兼容,我使用的是v4.23。 Hope it helps.
希望能帮助到你。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.