Ionic native share plugin not working for whatsapp


native share plugin works for email but when I use the share via whatsapp function it doesn’t work…
Can you suggest the code so that share plugin works for whatsapp as well.
I used the code similar to that give in ionic docs…


I have used Social Sharing .
First you have to inject the plugin.

constructor(private socialSharing: SocialSharing) { }

then you have to call the shareViaWhatsApp(message, image, url) function like this:

    this.socialSharing.shareViaWhatsApp("Your Message", "image" , "link")
        console.log("WhatsApp share successful");
      }).catch((err)=> {
      console.log("An error occurred ", err);

then you can call whatsappShare( ) to share.


you better share the code.
I confirm that share plugin works well in my app.


Here is the snippet of the code I used to impliment socialshare plugin.
Can you please help me figuring out where I went wrong.

PS: I repeat Email and twitter are working the plugin is not working for whatsapp and other social media



"If you want to use ‘shareViaWhatsApp’ on iOS9 you need to whitelist the url scheme of whatsapp and test for the app’s availability with canShareVia()"

window.plugins.socialsharing.canShareVia('whatsapp', 'Hi', file, url, [success], [error]);



i have the same issue.using share via whats app function.
helps to send message,while adding the url and image it shows “sharing failed please try again”


same here;

cli packages: (/usr/local/lib/node_modules)

    @ionic/cli-utils  : 1.19.1
    ionic (Ionic CLI) : 3.19.1

global packages:

    cordova (Cordova CLI) : 7.1.0

local packages:

    @ionic/app-scripts : 3.1.6
    Cordova Platforms  : ios 4.5.4
    Ionic Framework    : ionic-angular 3.9.2


    ios-deploy : 1.9.2
    ios-sim    : 6.1.2
    Node       : v6.9.5
    npm        : 5.3.0
    OS         : macOS High Sierra
    Xcode      : Xcode 9.2 Build version 9C40b

and here is my sharing code

this.share.shareViaWhatsApp(‘message’,’image url’,’shared url').then( () => {
                            const toast = this.toastCtrl.create({
                                message: ’Shared its ok...',
                                position: 'middle',
                                duration: 2000,
                            const toast = this.toastCtrl.create({
                                message: ’There is an error',
                                position: 'middle',
                                duration: 2000,

when i test it it shares only images. there is no message and no url.


I am facing the same issue, no url