Facebook 共享需要如下 ALAsset:
let content = FBSDKShareVideoContent()
//The videos must be less than 12MB in size.
let bundle = NSBundle.mainBundle()
let path = bundle.URLForResource("a", withExtension: "mp4")
let video = FBSDKShareVideo()
// doesn't work; needs to be an "asset url" (ALAsset)
//video.videoURL = path
content.video = video
let dialog = FBSDKShareDialog()
dialog.shareContent = content
dialog.show()
如何获取本地捆绑文档或 NSData 对象,并将其转换为 ALAsset?
(我最初的想法是将视频保存到本地相册,然后加载列表并选择它,但这是不必要的界面步骤)