5

I'm using Chrome to trigger intents by clicking on links in the browser:

<a href="intent://scan/#Intent;scheme=zxing;package=
                        com.google.zxing.client.android;end"> Take a QR code </a>

Works great with the barcode scanner. But is there any way to share an image in the same way for the WhatsApp application?

My guess it that it would look something like this (obviously missing the image here):

intent://send/#Intent;scheme=whatsapp;package=com.whatsapp;
                                            action=android.intent.action.SEND;end

But this only opens up the Google Play store and shows me WhatsApp.

Any ideas?

0x90
  • 39,472
  • 36
  • 165
  • 245
Johan
  • 35,120
  • 54
  • 178
  • 293

1 Answers1

2

you only need to use this.

<a href="whatsapp://send?text=<<HERE GOES THE URL ENCODED TEXT YOU WANT TO SHARE>>" data-action="share/whatsapp/share">Share via Whatsapp</a>
mayank
  • 543
  • 4
  • 14