Sharing link for WhatsApp Web version?

2020-02-26 07:05发布

问题:

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

回答1:

Try this link for the web version

Note: This link only works for the Whatsapp version on the web!

<a href="https://web.whatsapp.com/send?text=textToshare" target="_blank">Share via Whatsapp</a>

UPDATE

Note: This link works for Whatsapp web and Android versions.

<a href="https://api.whatsapp.com/send?text=textToshare" target="_blank">Share via Whatsapp API</a>

https://api.whatsapp.com/send?text=textToshare



回答2:

<a href="whatsapp://send?text=The text to share!" data-action="share/whatsapp/share">Share via Whatsapp</a>

Try this..



回答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.



回答4:

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'm%20interested%20in%20your%20car%20for%20sale

To create a link with just a pre-filled message, use https://wa.me/?text=urlencodedtext

Example:https://wa.me/?text=I'm%20inquiring%20about%20the%20apartment%20listing

After clicking on the link, you will be shown a list of contacts you can send your message to.