Skip to content

Instantly share code, notes, and snippets.

@eduardobc88
Created February 15, 2016 17:34
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save eduardobc88/5770e1dadfd22f589951 to your computer and use it in GitHub Desktop.
Save eduardobc88/5770e1dadfd22f589951 to your computer and use it in GitHub Desktop.
Share HTML Button Telegram and WhatsApp
<a href="whatsapp://send?text=https://www.google.com.mx/" data-action="share/whatsapp/share" >Compartir en WhatsApp</a>
<br>
<a class="tgme_action_button" href="tg://msg_url?url=https://www.google.com.mx/">Compartir en Telegram</a>
@AliveDD
Copy link

AliveDD commented Nov 6, 2019

works correctly, thx) this is my links

<a href="//www.facebook.com/sharer/sharer.php?u=https://valid.url&amp;quote=text">Facebook</a>
<a href="//vk.com/share.php?url=https://valid.url&amp;title=text">Vkontakte</a>
<a href="tg://msg_url?url=https://valid.url&amp;text=text">Telegram</a>
<a href="whatsapp://send?text=text%20https://valid.url">Whatsapp</a

@thE-iNviNciblE
Copy link

@orlandogvargas
Copy link

orlandogvargas commented Apr 14, 2020

Hi! mi buttons automattic generate by id from MySQL on php

<a class='text-white' href='https://api.whatsapp.com/send?text=http%3A%2F%2Fdomain.com%2Furl.php%3Fid%3D" . $row["id"] . "'>Share on WhatsApp</a>
<a class='text-white' href='https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%domain.com%2Furl.php%3Fid%3D" . $row["id"] . "' target='_blank'>Share on  Faceobok</a>

@007lva
Copy link

007lva commented Feb 18, 2021

is data-action attribute really needed for whatsapp?

@rktiwari00
Copy link

Hello

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment