Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Share a link from my website to WhatsApp web application

Tags:

I have a web application and in that, I am trying to share a link to WhatsApp web application and but not in mobile app.

I have gone through Sharing link for WhatsApp Web version? but no solution is provided.

Is it feasible?

What have I tried till now

<a href="whatsapp://send?text=www.google.com" data-action="share/whatsapp/share">Share via Whatsapp</a> 

This code helps me to share it via WhatsApp mobile application. Is there a way to do the same in WhatsApp web application?

like image 995
Raja Dhasan Avatar asked Jul 18 '16 12:07

Raja Dhasan


People also ask

How can I add WhatsApp button to my HTML website?

The best way to add a WhatsApp chat icon on your website is by using a multichannel chat widget, such as Trengo. With this, your customers can contact you via a WhatsApp button on your website. An example of a Trengo website widget with WhatsApp Business as one of the available channels.


2 Answers

This link - will always open a browser, even if you're in mobile.

<a href="https://web.whatsapp.com/send?text=www.google.com" data-action="share/whatsapp/share">Share via Whatsapp web</a> 

But when using the api.whatsapp.com - it will try to first, open the whatsapp mobile application OR whatsapp web on desktops if exists, if not - it will open other suitable app.

<a href="https://api.whatsapp.com/send?text=www.google.com" data-action="share/whatsapp/share">Share via Whatsapp web</a> 

So the api worked best for me

like image 86
Ricky Levi Avatar answered Oct 02 '22 21:10

Ricky Levi


this work for me

<a href="https://web.whatsapp.com/send?text=www.google.com" data-action="share/whatsapp/share">Share via Whatsapp web</a> 
like image 30
mahmud Avatar answered Oct 02 '22 22:10

mahmud