使用应用程序打开 Twitter URL,而不是浏览器

7 twitter android deep-linking ios

我有以下网址:

http://twitter.com/share?url=http://example.com"
Run Code Online (Sandbox Code Playgroud)

在 iOS 和 Android 上单击时,它会打开浏览器窗口。使用应用程序打开它的最佳方式是什么(如果他们安装了)?

编辑:

我已将网址更改为

https://twitter.com/intent/tweet?text=example
Run Code Online (Sandbox Code Playgroud)

但它仍然在浏览器中打开(我安装了应用程序)。这是否需要 JavaScript 或其他任何东西才能工作?

Mat*_*man 1

您将使用意图,如如何从我的应用程序中在 Android 的 Web 浏览器中打开 URL?

如果应用程序可用,用户可以决定应用程序是否应该处理 twitter URI。