Mobility has become the predominant medium today that's enabling global digitization transformation. The worldwide mobile phone penetration rate is estimated increase quickly and by 2020 almost 5.4 billion people will own handsets.
In the past (2015) worldwide mobile data traffic added to 3.7 exabytes/month, but by 2020 it is expected to reach 30.6 exabytes/month globally.
People are sharing stuffs with each other easily and frenzily, with the help of Social networking share buttons. Fast rendering, mobile friendly Accelerated Mobile Pages (AMP) are all craze now.
Since WhatsApp has witnessed the rise in its popularity as the most popular communicator, it is important for Bloggers to tap the potential of WhatsApp to improve their mobile traffic.
Let us implement AMP Whatsapp share button in this tutorial.
Step 1: The amp-social-share component will have to be added in the header.
<script async='async' src="https://cdn.ampproject.org/v0/amp-social-share-0.1.js" custom-element="amp-social-share" ></script>Step 2: Add a Layout gadget element and introduce this code.
<b:if cond='data:blog.isMobileRequest == "true"'>Step 3: You'll get a whatsapp share button like this visible when the page is viewed through mobile -
<amp-social-share data-share-endpoint="whatsapp://send" expr:data-param-text=""Check out - " + data:blog.canonicalUrl" layout="container" type="whatsapp">
<amp-img alt="Share via Whatsapp" height="45" layout="fixed" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCa1LAZhgOvt0mUMsWKa-HTWZBGa9alZGxZWclTqLS67d5SAb7AIYsHLvUmSly3l1IyKagV2Jgf3Z8j9YcbhkyEsPTJtDAGoc2IodgY4mldCii3Ww6MSHJCbkjQg4WWPrhV197pQ2w7Lcb/s1600/whatsapp-256.png" width="45">
</amp-img></amp-social-share>
</b:if>