i am trying to share the current link in whatsapp by using the following javascript and HTML
<script language="javascript">
function waCurrentPage(){
return "whatsapp://send?text=Check this out: "+'http://' +
window.location.hostname + window.location.pathname;
}
</script>
<a class="btn btn-social-icon btn-whatsapp" href="javascript:waCurrentPage()"
data-action="share/whatsapp/share"><i class="fa fa-whatsapp"></i>
</a>
I have have no idea why it is not working i am getting this output in a browser after pressing the button:
whatsapp://send?text=Check this out: http://bggressive.nl/test/index.html