我正在尝试在 Web 应用程序中使用 WhatsApp url 方案。我正在使用适用于 iOS 的 url 方案的 WhatsApp 文档,详情如下:http://www.whatsapp.com/faq/en/iphone/23559013
点击以下网址时: whatsapp://send?text=你好
在 iPhone 上,这会打开手机的 WhatsApp 应用程序。然而,在 Android 上,它只是在 Google 中查找此 url,而不会激活 WhatsApp 应用程序。
是否有适用于 android 的 url 方案?是否需要做一些不同的事情/对代码进行一些更改,以使其也能在 Android 上运行?
如何从浏览器以适用于 iOS 和 Android 的方式在 whatsapp 中共享 url?
最佳答案
Android URL Scheme 似乎与 iOS 相同
WhatsApp provides a custom URL scheme to interact with WhatsApp:
If you have a website and want to open a WhatsApp chat with a pre-filled message, you can use our custom URL scheme to do so. Opening whatsapp://send?text= followed by the text to send, will open WhatsApp, allow the user to choose a contact, and pre-fill the input field with the specified text.
关于android - 在 Android 上使用 Whatsapp url scheme,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19523873/