如何在 Swift 中将位置添加到推文?
How to add location to tweet in Swift?
我正在使用社交框架将我的应用程序中的内容分享到 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")
}
我正在使用社交框架将我的应用程序中的内容分享到 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")
}