Forum Xamarin.Forms
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Tracking what links a user is sharing from my app.

SteveGrixtiSteveGrixti Member
edited August 2019 in Xamarin.Forms

Hi All,

Could anybody help me out with a small issue i'm having? I am using the method below in order to share uri's from my app.

ShareTextRequest share = new ShareTextRequest
    Uri = uri,
    Title = "Share Link"

await Share.RequestAsync(share);

All is working fine on both Android and iOS, however I am running into an issue as I would like to track and log to what applications the users are sharing the link, for security purposes as per company policy.

An example of the log would be something like;

   'UserId': '999',
   'Link': '',
   'SharedTo': 'Facebook',
   'SharedOn': '29/08/2019 11:00.000'

Would it be possible to use a callback method for example, where I can return the name of the application the link was shared to?

Thanks in Advance :)


  • JarvanJarvan Member, Xamarin Team Xamurai

    From the source code of Essentials.Share, we can see that ShareTextRequest class doesn't have a method to get the feedback when sharing. To achieve the feature, you may need to create a custom_Share.

  • SteveGrixtiSteveGrixti Member
    edited August 2019

    Yes I actually got to this, just downloaded the code and went through it to see what is actually happening.

    How would one go ahead at extending this code?

    Cant understand how xamarin is able to recognize the difference between and share.ios.cs.

    If I know how this works, I'll try working on an extension of the class to provide more functionality.

Sign In or Register to comment.