0

I am adding share button in my website, and my share URL has some parameters. However, on phone extra parameters in the URL are ignored.

my button :

<a class='whatsapp-icon' href='whatsapp://send?text=https://www.exmaple.com/#/lat=10.11,long=20.11'></a>

When I open this link in webpage link it open fine with all parameters, but on the phone link comes as just www.exmaple.com and parameter '#/lat=10.11,long=20.11' is ignored in share window.

This is angular 1.xx webpage where share button is present.

BDL
  • 19,702
  • 16
  • 49
  • 50
Don
  • 1,302
  • 1
  • 9
  • 17

2 Answers2

1

LATEST WAY TO DO THIS

<a *ngIf="isWhatsAppIconVisible" href="https://api.whatsapp.com/send?text=check out this link : {{shareableUrl}}" data-action="share/whatsapp/share">
    <img src="assets/whatsapp.png" alt="whatsapp" /> 
</a>
kumar kundan
  • 1,968
  • 1
  • 26
  • 40
0

You need to sanitize anchor href. Here you can find a solution for your problem:

Whatsapp Sharing in AngularJS

Keep rocking!

Community
  • 1
  • 1
Jonathan Brizio
  • 928
  • 1
  • 12
  • 28