Pavan Vamsi Pavan Vamsi - 1 year ago 173
iOS Question

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

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

<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>

It works on android but not on iOS

Answer Source

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>
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download