gpt4 book ai didi

ios - 如何在 Facebook SDK 中快速共享图像和文本

转载 作者:行者123 更新时间:2023-12-01 21:58:07 27 4
gpt4 key购买 nike

我想在 Facebook 上分享带有图像和文本的帖子。我正在使用 Facebook SDK,并且可以共享图像,现在我想与该图像共享文本。我怎样才能?

这是分享图片的源代码,

 let photo:FBSDKSharePhoto = FBSDKSharePhoto()

var message:String?

let imageName:String = "Star.png"
photo.image = UIImage(named: imageName)
photo.isUserGenerated = true

let content = FBSDKSharePhotoContent()
content.photos = [photo];


let dialog = FBSDKShareDialog()
dialog.fromViewController = self
dialog.shareContent = content
dialog.mode = .native
dialog.show()

最佳答案

由于某些应用程序的滥用,Facebook 已通过简单地忽略它来明确禁用文本的预填充选项。

"You must not pre-fill any of the fields associated with the following products, unless the user manually generated the content earlier in the workflow: Stream stories (user_message parameter for Facebook.streamPublish and FB.Connect.streamPublish, and message parameter for stream.publish), Photos (caption), Videos (description), Notes (title and content), Links (comment), and Jabber/XMPP."

更多信息here .

关于ios - 如何在 Facebook SDK 中快速共享图像和文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54693141/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com