Sharing Link on Whatsapp from Mobile Website (Not Application) For Android

Sharing link on WhatsApp from mobile website (not application) for Android

Just saw it on a website and seems to work on latest Android with latest chrome and whatsapp now too! Give the link a new shot!

<a href="whatsapp://send?text=The text to share!" data-action="share/whatsapp/share">Share via Whatsapp</a>

Rechecked it today (17th April 2015):

Works for me on iOS 8 (iPhone 6, latest versions) Android 5 (Nexus 5, latest versions).

It also works on Windows Phone.

Whatsapp share link not working from mobile

I tried the same link in different android browser(FireFox) and it was working fine.

For chrome i changed the link to this -> whatsapp://send?text=

My code:

string WhatsappShareURL = "whatsapp://send?text=" + Request.Url.AbsoluteUri;
hlWhatsappMobile.NavigateUrl = Server.UrlEncode(WhatsappShareURL);

For Computers:
I use this link -> https://wa.me/?text=

My code:

string WhatsappShareURL = "https://wa.me/?text=" + Request.Url.AbsoluteUri;
hlWhatsappWeb.NavigateUrl = Server.UrlEncode(WhatsappShareURL);

Then i toggle them in jquery:

    $(document).ready(function () {
if ($(window).width() < 520) {
//Show mobile link
}
else {
//Show Web link
}
});

How to use mobile app into whatsapp share link working?

The below code directly shares the Text to the Whatsapp app using Intent.

Intent textIntent = new Intent(Intent.ACTION_SEND);
textIntent.setType("text/plain");
textIntent.setPackage("com.whatsapp");
textIntent.putExtra(Intent.EXTRA_TEXT, "Your text here");
startActivity(textIntent);

Whatsapp linking

Please try this for mobile

So for a danish number +45 1234 5678 it would be
4512345678
Change 45 to your contry code

<a id="app" target="_blank" href="whatsapp://send?phone=4512345678"> </a>

OR

<a id="app" target="_blank" href="https://api.whatsapp.com/send?phone=4512345678"> </a>

This will only work for mobile, not for desktop. You shuld make a modal so when its clicked they can choose to open mobile or desktop version of the link.



Related Topics



Leave a reply



Submit