I am using Unity3d and C# scripts/code. I just started to use Native share plugin by Yasirkula.
Here is part of my code:
NativeShare().SetSubject( "Check out this game!" ).SetText( "Link to my app here" ).Share();
When I reach this line the user sees a sharing menu, and he can choose any sharing app he wishes. How to make sure that the user actually shared the link on Whatsapp, FaceBook, Twiter and not using his clipboard or any other app? I want to reward the user only on a real social share.
Native Share has a way to choose what app you want to share with, but it's Android only:
// Share on WhatsApp only, if installed (Android only)
if( NativeShare.TargetExists( "com.whatsapp" ) )
new NativeShare().AddFile( filePath ).SetText( "Hello world!" ).SetTarget( "com.whatsapp" ).Share();
With this, you could make one button for each app you want to allow the user to share with, preventing sharing with non-social apps. I think this is the closest you can get of what you want.
Unfortunately I don't know if there are any workarounds for iOS and cancel/back button.
A lot of marketing emails use this technique to trace emails status:
The raw idea is to put a parameter in the URL that will be shared and track when this URL is used to access your application.
The parameter can be a cryptographic nonce with useful information. When you receive a request with that URL you decrypt the nonce and use this data to identify the user sharing the link.
Here you can investigate how this pattern is applied to trace email status (open, read, etc...)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With