所以基本上我正在制作一个活动应用.一切都进展顺利,但只是将活动分享到Twitter.
我已经搜索了互联网,但我得到的只是使用我不想要的Twitter原生应用程序.我想用浏览器发推文.
我已经为FB共享实现了这种方法.
任何想法都会对我有所帮助.
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()
}
Run Code Online (Sandbox Code Playgroud)