liron liron
liron liron

Reputation: 41

Whatsapp link do not open whatsapp application

I am using share buttons in this site footer. and the whatsapp button is working perfectly in all pages except pages with the url http://gnr.richkid.co.il/he/catalog/a/item/?ItemID=etc.....

You can see the buttons in the footer if you change user agent in chrome to mobile like iphone, galaxy etc.

it is just do not open the whatsapp.

the a href code:

<li>
   <a class="wa_btn wa_btn_l" href="whatsapp://send?text=גלשתי באתר הגלריה - בית לאירועים באזור השרון: http://gnr.richkid.co.il/he/catalog/a/item/Default.aspx?ItemID=268" data-text="share" data-href="http://gnr.richkid.co.il/he/catalog/a/item/Default.aspx?ItemID=268" target="_top">
      <i class="fa fa-whatsapp fa-2x"></i>    
   </a>
</li>

what is the problem? what should i fix?

thanks a lot, Liron.

Upvotes: 0

Views: 2207

Answers (1)

madole
madole

Reputation: 21

You're not encoding your string before using it in the href.

Have a look at my tutorial on this http://madole.github.io/blog/2015/06/18/mobile-browser-sharing-to-whatsapp-native-app/ .

Basically, use encodeURIComponent() on your string before putting it in the href.

Upvotes: 2

Related Questions