在Facebook swift 3中与描述分享图像

时间:2017-07-02 20:24:06

标签: ios facebook swift3 fbsdksharekit

我正在尝试使用FBSDKShareKit从我的应用分享带有描述的图片到Facebook。但问题是,我无法添加图像描述。 目前我有:

let content: FBSDKSharePhotoContent = FBSDKSharePhotoContent()
let photo:FBSDKSharePhoto = FBSDKSharePhoto()
photo.image = imageView.image
photo.isUserGenerated = true
content.photos = [photo]
content.contentURL = URL(string:directUrl)
FBSDKShareDialog.show(from: self, with: content, delegate: nil)

我也尝试过:

let vc = SLComposeViewController(forServiceType:SLServiceTypeFacebook)
vc?.add(imageview.image)
vc?.add(URL(string: "http://www.example.com/"))
vc?.setInitialText("description")
self.present(vc!, animated: true, completion: nil) 

使用social,其中setInitialText根据此answer不起作用 我也试过了:enter image description here

我可以通过其他方式与fb共享图像吗?

0 个答案:

没有答案