从 HTML href 到本机应用程序的链接 [英] link from HTML href to native app

查看:38
本文介绍了从 HTML href 到本机应用程序的链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

现在我正在创建一个自定义推文按钮,供用户单击它并自动调用 twitter 网络意图来共享/推特一些链接.我现在使用的方法是创建一个带有 href 的锚点到 https://twitter.com/share?url=[some url to share]

right now I'm creating a custom tweet button for user to click it and automatically call twitter web intent to share/tweet some link. the method I'm using now is creating an anchor with href to https://twitter.com/share?url=[some url to share]

因为我将在移动网站上使用它,是否可以创建类似的 href 或类似的链接,而不是打开本机应用程序来发送推文,而不是从浏览器中打开一个新标签来打开推特网站?(我的目标是让我的移动网站上的推文按钮具有原生的感觉)

because I will use this on mobile site, is it possible to create similar href or similar link that will instead open the native app to tweet rather than opening a new tab from the browser that will open twitter website? (My goal is to make the native feeling of the tweet button from my mobile site)

感谢任何帮助,谢谢!

推荐答案

查看 twitter 的 iOS URL Schemes.例如,可以使用 twitter://user?screen_name=lorenb 调用 twitter 方案.例如,请参阅此页面,了解更多信息.

Look into iOS URL Schemes for twitter. The twitter scheme, for example, can be invoked with twitter://user?screen_name=lorenb. See this page for example, for more info.

该站点尝试提供更全面的 iOS URL Schemes 列表:http://wiki.akosma.com/IPhone_URL_Schemes#Twitter

This site attempts a more comprehensive list of iOS URL Schemes: http://wiki.akosma.com/IPhone_URL_Schemes#Twitter

这篇关于从 HTML href 到本机应用程序的链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆