我正在使用Social Framework能够将我的应用程序中的内容共享到Twitter。我希望能够在推文中添加位置。这是我的代码:
if SLComposeViewController.isAvailableForServiceType(SLServiceTypeTwitter) {
let twitterComposeVC = SLComposeViewController(forServiceType: SLServiceTypeTwitter)
twitterComposeVC.setInitialText("I found a really nice spot. Check it out here")
self.presentViewController(twitterComposeVC, animated: true, completion: nil)
} else {
self.showAlertMessage("Please make sure you're logged into Twitter in your device settings")
}
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句