iOS Facebook与Twitter share

2021-11-05  本文已影响0人  KingWorld

The Facebook, Twitter, and Other apps options have been removed in the Settings app.

That apps will now be treated like other apps, using the iOS sharing extensions

let share = [image, text, url]
let activityViewController = UIActivityViewController(activityItems: share, applicationActivities: nil)
activityViewController.popoverPresentationController?.sourceView = self.view
self.present(activityViewController, animated: true, completion: nil)

You can also use third party SDK for individual sharing

Facebook Sharing Doc

Twitter Sharing Doc


翻译:

Settings应用中的Facebook,Twitter和其他应用选项已被删除.

现在可以使用iOS sharing extensions

将这些应用与其他应用一样对待

let share = [image, text, url]
let activityViewController = UIActivityViewController(activityItems: share, applicationActivities: nil)
activityViewController.popoverPresentationController?.sourceView = self.view
self.present(activityViewController, animated: true, completion: nil)

您还可以使用第三方SDK进行个人共享

Facebook共享文档

Twitter共享文档

上一篇下一篇

猜你喜欢

热点阅读