I get error when i use social-sharing on ionic3

I got a run time error when click the facebook btn for share …

this.socialSharing.shareViaFacebook(“text”, null, null).then(() => {

  console.log("shareViaFacebook: Success");

}).catch(() => {

  console.error("shareViaFacebook: failed");


And also other social share.


My IONIC info as


Ionic CLI : 5.4.2 (C:\apps\node_modules\ionic)
Ionic Framework : ionic-angular 3.9.5
@ionic/app-scripts : 3.2.4


Cordova CLI : 9.0.0 (cordova-lib@9.0.1)
Cordova Platforms : android 8.1.0
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.1.3, (and 7 other plugins)


cordova-res : 0.8.1
native-run : 0.3.0


NodeJS : v10.15.3 (C:\Program Files\nodejs\node.exe)
npm : 6.13.1
OS : Windows 10

Installed plugins are


In the future, please post anything containing text as text, not images. It helps anybody trying to help you, as well as others who may have similar problems.

The error message is telling you exactly what is wrong and where to look. You are putting things in the providers stanza of your app module that don’t belong.

1 Like