JSFiddle - React, Tailwind, and code Playground

HTML

<!--<a href="fb://publish/profile/me?text=helloworldtest">facebook</a>-->

<a href="twitter://post?message=">
    Twitter
</a>

<a href="whatsapp://send?text=" data-action="share/whatsapp/share">
    WhatsApp
</a>

<a href="viber://forward?text=">
    Viber
</a>

<a href="gplus://plus.google.com/share?url=http://an-link.com" id="gplus">
    Google+
</a>

<a href="fb://publish/profile/me?text=">
    Facebook
</a>

<button onclick="window.open('whatsapp://send?text=')">WhatsApp Attempt 2</button>

CSS

a {
    display: block;
}

JavaScript

var anchor = document.querySelectorAll('a');

for ( var i = 0, l = anchor.length; i < l; i++ ) {
    if ( anchor[i].id === 'gplus' )
        return;
    
	anchor[i].href = anchor[i].href + encodeURIComponent( 'Some text and such... As well as the link: http://google.com' );
}