简体   繁体   English

iOS,通过Twitter和Facebook共享webView内容(长文本或.pdf)

[英]iOS, share webView content (long text or .pdf) via twitter and Facebook

Hello fellow developers, 各位开发人员大家好,

I have some html loaded into a webview. 我有一些HTML加载到webview中。 I need to share its contents with twitter and Facebook, hence need to understand the following: 我需要与Twitter和Facebook分享其内容,因此需要了解以下内容:

  1. Is there a way to share long text to twitter? 有没有办法分享长文本到Twitter? If that's not supported natively, maybe you are aware of some service that would accept some text and give me a link for that 如果本机不支持该功能,也许您知道某些服务会接受一些文本并为此提供一个链接
  2. I'm able to generate a .pdf from webview (following some article from this question How to convert html data to PDF in objective c ) Are you aware of some service with iOS SDK that would accept a .pdf file and give me a link for that ? 我能够从webview生成.pdf(此问题后面的几篇文章如何在目标c中将html数据转换为PDF )您是否知道iOS SDK的某些服务会接受.pdf文件并提供链接为了那个原因 ? Having that you could simply share link via twitter. 这样,您可以简单地通过Twitter分享链接。

I've spent some time googling both of those and at the moment the only idea is using dropbox, which kinda solves the case but provides not the best user experience since one would need to log-in to dropbox to enable the share functionality. 我花了一些时间在这两个位置上进行了搜索,目前唯一的想法是使用保管箱,虽然可以解决问题,但不能提供最佳的用户体验,因为需要登录保管箱才能启用共享功能。

Looking forward to hear your thoughts. 期待听到您的想法。

--Dan - 担

I recommend setting up a basic PHP service on your website (if you have one) to where you can upload the .PDF and then feed the returning link to an iOS API such as bit.ly's. 我建议在您的网站(如果有)上设置基本的PHP服务,您可以在其中上传.PDF,然后将返回的链接提供给iOS API(例如bit.ly's)。

Their API will return a shortened link to the .PDF on your website and you can also track click counts with bit.ly 他们的API将返回指向您网站上.PDF的缩短链接,您还可以使用bit.ly跟踪点击计数

http://github.com/bitly/bitly_ios_sdk http://github.com/bitly/bitly_ios_sdk

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在iOS上本地化Facebook和Twitter共享面板 - Localize Facebook and Twitter Share Panels on iOS iOS分享到Facebook / Twitter按钮图像 - iOS share to facebook/twitter button images 在iOS应用中创建共享按钮(Twitter Facebook…) - Creating share buttons in iOS app ( twitter facebook…) 在iOS上不使用UIActivityViewController的情况下,Facebook,Twitter和邮件共享 - Facebook, twitter and mail share without UIActivityViewController on iOS 通过iOS App在Twitter上分享视频 - Share videos on Twitter via iOS App 经过足够长时间的试用,通过消息或电子邮件在iOS本机应用程序上共享内容 - Share content on an iOS native app via messages or email with long enough trial iOS-是否可以在iOS 5中将带有文本的UIImage共享到Facebook? - iOS - Is it possible to share UIImage with text to Facebook in iOS 5? Facebook 共享内容仅在 iOS 9 中共享 URL - Facebook share content only shares URL in iOS 9 通过UIActivityViewController(Twitter,Facebook,Instagram)与hashtag共享图像 - Share image with hashtag via UIActivityViewController (Twitter, Facebook, Instagram) UIActivityViewController Facebook和Twitter共享在已发布的iOS版本中不起作用 - UIActivityViewController Facebook and Twitter share not working in released iOS version
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM