1

In my mobile web, there's a link that lets you share the page through Whatsapp. Basically, it's an anchor element with a whatsapp://send value in its href.

It works perfectly if I use it with an Android device, but when I click it with my iPhone (tested with iPhone 5s, iOS 8 and Safari), it opens the WhatsApp app but the share text isn't actually copied in the text field.
This is my code:

<a class="whatsapp" href="whatsapp://send?text=This is the text that I wanna share." data-action="share/whatsapp/share">Share with whatsapp!</a>

What's the matter with it?
Thanks!

peregraum
  • 529
  • 1
  • 8
  • 19

1 Answers1

2

Be sure to also escape the following symbols inside the value for text: !*'();:@&=+$,/?%#[] This was an issue that I had when trying to share a url.

Bea M
  • 36
  • 5
  • Yes!! That's what I did, but instead of doing it manually, I think I did it with a php function! But thanks!! – peregraum May 18 '15 at 13:56