单击移动网站中的链接应打开 whatsapp 应用程序 [英] Clicking a link in mobile website should open whatsapp app
问题描述
我不想在whatsapp中分享文字,只想在我尝试过的点击时打开whatsapp应用
I dont want to share text in whatsapp, just want to open whatsapp app on click I tried
<a href="whatsapp://" class="btn whatsapp-btn btn-outline whatsapp-outline btn-block" >Create group</a>
引用的几个链接 如何在点击超链接/图片/按钮时只打开whatsapp应用Whatsapp html 调用链接
但无法得到确切答案.
推荐答案
WhatsApp 提供了一个自定义 URL 方案来与 WhatsApp 交互:
WhatsApp provides a custom URL scheme to interact with WhatsApp:
如果您有一个网站并想与预填充的消息,您可以使用我们的自定义 URL 方案来执行此操作.打开 whatsapp://send?text= 后跟要发送的文本,将打开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.
所以,这应该有效:
<a href="whatsapp://send?text=YoYoYo" class="bla">Whatsapp link</a>
如果我幸运的话,还有这个!(从移动设备点击时...)
And if i'm lucky, also this! (when clicked from mobile device...)
这篇关于单击移动网站中的链接应打开 whatsapp 应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!