【发布时间】:2021-01-23 01:31:45
【问题描述】:
我尝试将视频分享到 Facebook,但没有出现显示视频的对话框。
func facebookShare(url: URL){
guard let schemaUrl = URL(string: "fb://") else {
return //be safe
}
if UIApplication.shared.canOpenURL(schemaUrl) {
let video = ShareVideo(videoURL: url)
let content = ShareVideoContent()
content.video = video
let dialog = ShareDialog()
dialog.shareContent = content
dialog.delegate = self
dialog.fromViewController = self
dialog.mode = .automatic
dialog.show()
}else {
print("app not installed")
}
}
这是我的图像选择器功能
func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any]) {
self.dismiss(animated: true, completion: nil)
videoURL = info[UIImagePickerController.InfoKey.init(rawValue: "UIImagePickerControllerMediaURL")] as? URL
}
【问题讨论】:
标签: ios swift facebook share fbsdk