How to add "Share on whatsapp" button on mobile website for iOS

Pavan Vamsi picture Pavan Vamsi · Feb 16, 2015 · Viewed 20.8k times · Source

Adding whatsapp share button on website, for iOS8. I am using the following:

<spanid="whatsapp_share_android">
    <a href="whatsapp://send?text={{my_meta.og_title.value}} - http://{{ request.get_host }}{{entity.url}}%3Futm_source=whatsapp%26utm_medium=referral" data-action="share/whatsapp/share" onmousedown="_paq.push(['trackEvent','Share on Whatsapp','Mobile','{{request.get_full_path}}']); ga('send', 'event','Share on Whatsapp','Mobile','{{request.get_full_path}}');ga('mobileTracker.send', 'event','Share on Whatsapp','Mobile','{{request.get_full_path}}');"><img src="{{ STATIC_URL }}images/whatsapp_icon.png" /></a>
</span>

It works on android but not on iOS

Answer

Patrick Rudolph picture Patrick Rudolph · Feb 19, 2015

According to the WhatsApp FAQ for app integration, your URL scheme should work:

I assume that everything within brackets in your sample code will be replaced by your app? Also there needs to be a space between the span tag and its id attribute.

How about if you try it with this simple example on both platforms:

<a href="whatsapp://send?text=Hello%20World!">Hello, world!</a>