2

I am using aspx to initialize the whatsApp click to chat feature to share a link. The aspx code is :

<a href='<%#"https://wa.me/?text="+ Server.UrlEncode(Request.Url.AbsoluteUri)%>' class="fa fa-whatsapp social-share-link a-fb-whatsapp" target="_blank"></a>

The link was working fine. I was able to share the link. But in the recent months i am not able to share the link as i get a message from whatsapp in my mobile displayed as

Couldn't open link

Screen Shot:

enter image description here

NOTE: I am able to share from web browser but not from my mobile.

Is there anything wrong in the syntax or has whatsapp updated their feature, but i dont think so as their docs are still having the same info ?

Edit: The output url looks like this in chrome inspector:

https://wa.me/?text=https%3a%2f%2fwww.website.com%2fblog%2fPageName.aspx%3fblog%3dtitleword-your-titleword-system-using-titleword%26id%3d10%26temp%3dq

Ricardo A.
  • 685
  • 2
  • 8
  • 35
Thameem
  • 700
  • 1
  • 13
  • 38

2 Answers2

2

For computers, you will want to use this link...

https://api.whatsapp.com/send?text=YourTextHere

Otherwise, if you use wa.me, you will get an error page, unless you have the phone number included. For example, this links to an error: https://wa.me/?text=SomeTexttoShare

Typically, you don't know the number, and you want the user to specify. In that case, you MUST use the api.whatsapp.com domain.

HoldOffHunger
  • 18,769
  • 10
  • 104
  • 133
  • The wa.me link was working fine till last week. has whatsapp updated it? – Thameem May 15 '20 at 06:41
  • 1
    I thought it was working just fine a week ago, too! But after researching a bit, I'm not really sure. Maybe it's been broken a while? https://stackoverflow.com/q/56372575/2430549 – HoldOffHunger May 15 '20 at 13:54
0

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
        }
    });
Thameem
  • 700
  • 1
  • 13
  • 38