Socialsharing plugin not working

Hi there! I had plugin cordova-plugin-x-socialsharing working fine in phonegap with version 5.6.5 for actions after pressing the classic share button. Now, after migrating to volt, the plugin is installed fine (no build errors) but doesn´t work. When catching the error it says “cannot read property ‘socialsharing’ of undefined”, which seems to mean Volt is not installing correctly the SocialSharing.js.
Hope you can help us!

I had this note from another user who was having problems with this control. I don’t know if it will help.

What happens with this plugin is you put a “Share on Facebook” button in your app and then you test if Facebook is available like this:

            // facebook sharing is available
              // facebook sharing is NOT available, disable the button
            $("#shareFB").click(function() { e.preventDefault(); });
            $("#shareFB").css({ opacity: 0.1 });

If the Facebook app is installed you would hit the button and onclick=“FaceBook();” calls this function:

function FaceBook()
  // msg via Facebook (with errcallback)
  window.plugins.socialsharing.shareViaFacebook('Message via Facebook', 
        function() {console.log('facebook share ok')}, 
            popupDialog(errormsg, "FaceBook Sharing Error", ['Ok'] );

Thank you, but I´ve tried this too and in all cases i call functions from this plugin, it looks like something´s failing when importing it into the project, and socialSharing.js is not being finally included.

Can this be a problem - es6-promise-plugin

I cant get cordova-plugin-x-socialsharing to work either, and now I am down to only include
theese 4 plugins.
<plugin name="cordova-plugin-inappbrowser" source="npm" />
<plugin name="cordova-plugin-splashscreen" spec="~5.0.4" />
<plugin name="cordova-plugin-whitelist" spec="1.3.1"/>
<plugin name="cordova-plugin-x-socialsharing" source="npm" />

**BUT when download and decompile I see the es6-promise-plugin

  • so it must be added from somewhere right?**

And I see that other are haveing Issues with cordova-plugin-x-socialsharing
and es6-promise-plugin

Problem : the plugin doesn’t install because of es6-promise-plugin #922

ALL HELP ARE WELCOME :slight_smile:


The solution is to insert

<script type = "text / javascript" charset = "utf-8" src = "cordova.js"> </script>

not only on index.html but all pages you trigger cordova