A simple implementation of WhatsApp sharing button. The code creates an image button. It can be configured to create button (w/o an image) or label instead.
- Copy the
src/js
directory to your website static files directory. - Add this to the
<head>
element of the page:
<script type="text/javascript" src="js/wa-share.js"></script>
- Add this inside the
<body>
element of the page:
<div id="<element-id>"></div>
<script type="text/javascript">
WABTN.share({
id: "<element-id>",
text: "<text-to-share>",
size: "<sm | md | lg>"
});
</script>
To submit any issues, raise an issue through the Issues Page
MIT