Currently, if a user is on a Mobile phone, one can create a link on a web-site as such (for Android)
<a href="whatsapp://send?text=Hello World">WhatsApp</a>
which, when clicked, will open WhatsApp app on the user's phone, ask them to select a contact/group and pre-fill the message box with "Hello World".
However, if the user is on a Desktop, I can link to WhatsApp web but I can't find a way to pre-fill the message box. For example,
<a href="http://web.whatsapp.com/send?text=Hello World">WhatsApp</a>
does not work.
Does anyone know of a way to do this?
Best Answer
Use
https://api.whatsapp.com/send?text=
and urlencode your text.Example:
https://api.whatsapp.com/send?text=I'm%20inquiring%20about%20the%20apartment%20listing
reference: https://faq.whatsapp.com/en/26000030/