How to get Share event call back


#1

Hello,

I have implemented share in my application but I want to increase the share count do we have any method by which we can get the callback of success or error if a user has been shared or not and the provider like (Facebook and Instagram) if it is returned with success response.

Thanks in advance


#2

Hey @kapilkarda,

If this is regarding React Native’s Share API, the only callback you can get is the sharedAction and dismissedAction mentioned here: https://docs.expo.io/versions/v30.0.0/react-native/share#share Though on Android it always resolves with sharedAction so it won’t be the most reliable in regards to a share count. To get the provider, you’d have to use a library like react-native-social-share but would require ejecting.

Cheers,

Adam