Ionic-native/social-sharing Check if user shared successfully

Hello everyone
I’d like ask that if I’m able check user shared or not because I’d like to give a score them if they share my post .They can click the take a photo button then click share button but then they can cancel the share facebook window

  share() {
    this.socialSharing.shareViaFacebook("Message via Fb" ,this.base64Image).then(() => {
      // Success!

    }).catch(() => {
      // Error!

I put an alert under the success! comment but whenever i cancel the fb share window it also says success.Where can I check it or am i able to check it.
Thank you

Have you try on Android or iOS?

As long as I remember, the social sharing plugin isn’t able on Android to tell you if it’s a success or not. On iOS everyting is fine.

I spend hours to find a solution and I’ve to say, I didn’t find any except a workaround.

On iOS I use the social sharing plugin.
On Android, I use the cordova-plugin-facebook4 dialog because at least this plugin tells you if the user used the acttion cancel or not

Also to be noted, Facebook API doesn’t give back tanymore the post id of the publication to the caller respectively you can’t be 100% sure that a user shared or not something, more to see like a guess, at least I understood it like this.

Hope that help

1 Like

Thank you for your reply.Actually I dont want to use facebook4 now i guess it wants api key and keyhashes , social sharing doesnt require anything its much easier for me :smiley: .Probably I ll import the facebook4 when i relase it.Thank you , you helped a lot :+1:

1 Like

I understand that. Maybe just first try on iOS to be sure that what I said is still correct, even I’ve got that in store you never know :wink:

Okay I’ll try thank you for your informing :slight_smile:

1 Like