Reputation: 65
I tried all the Information I could find. But im too stupid to make it work. Im not a programmer. Would love to offer my readers on my blog a share button to whatsapp.
the following was working half way.
<a href="whatsapp://send?text=The text to share!" data-action="share/whatsapp/share">Share via Whatsapp</a>
its opening whatsapp but its not fetching the current page url link. how could I make this work? to share easy and fast current page urls via whatsapp as a link. in best case in android and ios.
Thanks for any help
Upvotes: 0
Views: 1415
Reputation: 154
<a href="whatsapp://send?text=https://linktopreview.com" rel="noopener" target="_blank">Share on Whatsapp</a>
You need to include the url
Upvotes: 0
Reputation: 178421
Try this
<a href="" target="_blank" onclick="this.href='https://wa.me/?text=Have a look at:'+location.href">WA</a>
Upvotes: 1