基本上我正在制作一个事件应用程序。一切都进行得很顺利,但是只有在Twitter上分享活动会出现问题。
我已经搜索了互联网,但我找到的都是使用Twitter的原生应用程序,而我不想这样做。我想使用浏览器来发推文。
我已经实现了Facebook分享的方法。
任何想法都将对我有很大帮助。
let content = FBSDKShareLinkContent()
content.contentURL=NSURL(string: "http://facebook.com")
content.imageURL = NSURL(string: "http://facebook.com")
content.contentTitle = "Shou 3emlin test app "
content.contentDescription = "testing testing testing"
let shareDialog = FBSDKShareDialog()
shareDialog.fromViewController = self
shareDialog.mode=FBSDKShareDialogMode.Browser
shareDialog.shareContent = content
if !shareDialog.canShow() {
shareDialog.mode=FBSDKShareDialogMode.Native
shareDialog.shareContent = content
}
if shareDialog.canShow() {
shareDialog.show()
}