当用户将照片视频分享给应用时,我需要附上说明或状态,这是我现在的代码:
视频:
let fbVideo: FBSDKShareVideo = FBSDKShareVideo()
fbVideo.videoURL = self.videoUrl!
var content: FBSDKShareVideoContent = FBSDKShareVideoContent()
content.video = fbVideo
FBSDKShareAPI.shareWithContent(content, delegate: nil)
和图片:
let photo : FBSDKSharePhoto = FBSDKSharePhoto()
photo.image = self.image
photo.userGenerated = true
var content: FBSDKSharePhotoContent = FBSDKSharePhotoContent()
content.photos = [photo]
FBSDKShareAPI.shareWithContent(content, delegate: nil)
似乎无法将文本状态附加到FBSDKShareContent