Ionic social sharing error

Hi i got a project in inocic 3.x and i am trying to use the socialSharing plugin(https://ionicframework.com/docs/native/social-sharing/) i followed all the steps found in this tutorial(https://medium.com/@mikeyny/easy-social-sharing-with-ionic-3-and-ionic-native-f2c42807f43c) but when i click the butto binded to the share function it show the error ‘object is not a function at socialShare.share()’

my ionic info:

Ionic:

   ionic (Ionic CLI)  : 4.10.1 (/usr/lib/node_modules/ionic)
   Ionic Framework    : ionic-angular 3.9.2
   @ionic/app-scripts : 3.2.0

Cordova:

   cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
   Cordova Platforms     : android 7.0.0, browser 5.0.4
   Cordova Plugins       : cordova-plugin-ionic-keyboard 2.1.2, cordova-plugin-ionic-webview 2.1.4, (and 10 other plugins)

System:

   Android SDK Tools : 26.1.1 (/opt/SDK)
   NodeJS            : v11.8.0 (/usr/bin/node)
   npm               : 6.5.0
   OS                : Linux 4.15

my cordova plugins:

cordova-plugin-device 2.0.2 "Device"
cordova-plugin-device-motion 2.0.1 "Device Motion"
cordova-plugin-geolocation 4.0.1 "Geolocation"
cordova-plugin-gyroscope 0.1.4 "Device Gyroscope"
cordova-plugin-ionic-keyboard 2.1.2 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 2.1.4 "cordova-plugin-ionic-webview"
cordova-plugin-request-location-accuracy 2.2.3 "Request Location Accuracy"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-statusbar 2.4.2 "StatusBar"
cordova-plugin-whitelist 1.3.3 "Whitelist"
cordova-plugin-x-socialsharing 5.4.4 "SocialSharing"
cordova-sqlite-storage 2.6.0 "Cordova sqlite storage plugin"
es6-promise-plugin 4.2.2 "Promise"

my package.json: (https://pastebin.com/dWRUGnqr)

1 Like

solved by installing

npm install --save @ionic-native/social-sharing@4.20.0

4 Likes

I was trying to use the latest @5.2 … Did get [Object(…) is not a function

Solved with this too

npm install --save @ionic-native/social-sharing@4.20.0

thank you

1 Like