cordova social share plugins doesn't work on my Angular2 app

295 Views Asked by At

I'm stuck in a problem about how to use this social share plugins. SocialSharing-PhoneGap-Plugin When I'm trying to call this plugin, I got an undefined error. Here is my code.

window.plugins.socialsharing.share("test");

Then this "socialsharing" property is undefined. Is there anyone who has the same error?

1

There are 1 best solutions below

1
On

Do any plugins work for you? Because it can be caused by many things. Like: you don't wait for deviceready to fire before invoking the plugin, you didn't include a reference to cordova.js in your html file, you didn't include the plugin, you're running in a browser, etc.