1

I'm using SocialSharing-PhoneGap-Plugin in an Ionic2 app - but I need to get a confirmation whether something was shared or not. Is there a way to do this? Does the OS (iOS or Android) provide some type of confirmation signal as to whether the user hit OK/Cancel on the action sheet?

I'm a newbie programmer so I'd appreciate some code sample. Thanks in advance.

Here's my current code:

   otherShare(){
     this.sharingVar.share("General Message Body Goes Here","Hello 
     World","assets/images/image.jpg","http://example.com")
     .then(()=>{
         alert("Success");
       },
       ()=>{
          alert("failed");
       })
     };
frednikgohar
  • 340
  • 1
  • 3
  • 14
  • I also had this issue. If you read the plugin description [here](http://ionicframework.com/docs/native/social-sharing/) in ionic 2 documentation, they have said that `.share(...)` returns a promise. But, in fact it returns void. And this error comes `Error : Property 'then' does not exist on type 'void'.` Can you try to put `alert()` and see what it alerts. e.g. `alert( SocialSharing.share(...) )`. – Sagar Kulkarni Apr 19 '17 at 10:56

0 Answers0