Reputation: 171
I placed a button on my website with a link for people to share articles on Whatsapp. The code is this and works fine:
<a href="whatsapp://send?text=Hello%20World!">Hello, world!</a>
But this doesn't work on the desktop version. Does anybody know the url to share text/link on the Whatsapp Web? This here: https://web.whatsapp.com
Upvotes: 17
Views: 19818
Reputation: 1236
Note: To create a link with a pre-filled message, use this link (works only for the Whatsapp web version!)
Example:
<a href="https://web.whatsapp.com/send?text=textToshare" target="_blank">Share via Whatsapp</a>
Note: you can use this link which includes a pre-filled message which will automatically appear in a chat text field (works for all platforms!)
Example:
<a href="https://api.whatsapp.com/send?text=textToshare" target="_blank">Share via Whatsapp API</a>
https://api.whatsapp.com/send?text=textToshare
Upvotes: 26
Reputation: 109
To create your own link with a pre-filled message that will automatically appear in the text field of a chat, use https://wa.me/whatsappphonenumber/?text=urlencodedtext where whatsappphonenumber is a full phone number in international format and URL-encodedtext is the URL-encoded pre-filled message.
Example: https://wa.me/15551234567?text=I%27m+interested+in+your+car+for+sale
To create a link with just a pre-filled message, use https://wa.me/?text=urlencodedtext
Example: https://wa.me/?text=I%27m+inquiring+about+the+apartment+listing After clicking on the link, you will be shown a list of contacts you can send your message to.
Upvotes: 4
Reputation: 3
Try this
<a href="https://api.whatsapp.com/send?text=textToshare" target="_blank">Share via Whatsapp</a>
This is new updated API link to share web pages or links to your whatsapp contacts.
Upvotes: 0
Reputation: 1116
<a href="whatsapp://send?text=The text to share!" data-action="share/whatsapp/share">Share via Whatsapp</a>
Try this..
Upvotes: 0