How to share link or message from Windows Phone App

How to share a link or message from our Windows Phone app to Facebook, Twitter, LinkedIn. Usually, you would implement oAuth to post status message to social media. Even though we have plugins, it is little hard to implement because it requires us to create app id in the social media developer websites and use those IDs to pass the application token and so on…Just for sharing  status message we have to do this much.

When developing for a windows phone (of course we have same feature in iOS 6 also) it is little more easy. Just write few lines of code and it will automatically open and sharing the screen. For this we have Share Task.  In the screenshot below, I used Microsoft.Phone.Tasks.ShareLinkTask.  You can also see code lines. By the way, Windows phone user must add that social media to his profile from people app settings.

Sharing form Windows Phone app
Sharing form Windows Phone app

Here is code lines:
ShareLinkTask shareLinkTask = new ShareLinkTask();
shareLinkTask.Title = "Posted using ShareLinkTask";
shareLinkTask.LinkUri = new Uri("", UriKind.Absolute);
shareLinkTask.Message = "Wow!, I did it!";

There are a few more Share tasks available. Here are the links to learn more.


Working with iOS sharing part now… 😉

One thought on “How to share link or message from Windows Phone App

Leave a Reply