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?
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