Hello, I would like to add social media apps like facebook, twitter whatsapp to be displayed on the DataTransferManager.ShowShareUI() screen launched from my app and want to share the content.

Ankur Sharma 0 Reputation points Microsoft Employee
2023-06-21T05:36:07.3566667+00:00

ISocialMediaSharing

need to show social media icons like facebook, twitter, instagram whatsapp etc to share my uwp app through a share button which opens showShareUI.

Developer technologies | Universal Windows Platform (UWP)
Windows for business | Windows Client for IT Pros | User experience | Other
Developer technologies | C#
{count} votes

1 answer

Sort by: Most helpful
  1. Junjie Zhu - MSFT 21,646 Reputation points
    2023-06-21T06:49:33.46+00:00

    Hello @Ankur Sharma ,

    Welcome to Microsoft Q&A!

    To show UWP icon on ShareUI, your app needs to declare that it supports the Share contract. This lets the system know that your app is available to receive content.

    1. Open the manifest file. It should be called something like package.appxmanifest.
    2. Open the Declarations tab.
    3. Choose Share Target from the Available Declarations list, and then select Add.

    For details on how to set the share type and get the sharing content, please refer to official document Receive data.

    Here is the complete code sample.

    Thank you.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    https://docs.microsoft.com/en-us/answers/articles/67444/email-notifications.html


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.