最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Clicking a link in mobile website should open whatsapp app - Stack Overflow

programmeradmin0浏览0评论

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>

Referred couple of links how to open only whatsapp application when click on a hyperlink/image/button also Whatsapp html call link

But couldn’t get the exact answer.

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>

Referred couple of links how to open only whatsapp application when click on a hyperlink/image/button also Whatsapp html call link

But couldn’t get the exact answer.

Share Improve this question edited May 23, 2017 at 12:25 CommunityBot 11 silver badge asked Mar 16, 2017 at 11:24 Chandrika DesaiChandrika Desai 971 gold badge3 silver badges8 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 4

From Whatsapp documentation:

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.

So, this should work:

<a href="whatsapp://send?text=YoYoYo" class="bla">Whatsapp link</a>

And if i'm lucky, also this! (when clicked from mobile device...)

发布评论

评论列表(0)

  1. 暂无评论