Im building a website in php , i would like to implement whatsapp share button in it .I searched the internet for a while but couldn't find anything can any one explain how it works and how can i implement
Thanks in advance
Im building a website in php , i would like to implement whatsapp share button in it .I searched the internet for a while but couldn't find anything can any one explain how it works and how can i implement
Thanks in advance
UPDATE
A simplified version of the below URL is, here number and text are optional
https://wa.me/91XXXXXXXXXX?text=urlencodedtext
<a href="https://wa.me/91XXXXXXXXXX?text=urlencodedtext" target="_blank">WA</a>
This might help you
<a href="https://api.whatsapp.com/send?phone=91XXXXXXXXXX&text=urlencodedtext" target="_blank">WA</a>
phone and text parameters are not mandatory
this works in the mobile browser and pc browser, in pc this will open https://web.whatsapp.com/
I think this might be a better solution.
Please note that this only works with mobile devices and mobile browsers
use this to share in whatsapp, text= The text to share / link / or anything; if you are using url, dont forget to encode it
<a href="whatsapp://send?text=The text to share!" data-action="share/whatsapp/share">Share via Whatsapp</a>