How to Share Link with the ShareLinkTask in Windows Phone ?

You can easily share the link from your Windows Phone App using the ShareLinkTask Launcher .

You could share link on FaceBook , Twitter , WindowsLive , LinkedIn etc.

To share link via Windows Phone App , follow the below steps

1. Include the namespace using Microsoft.Phone.Tasks;

This is the namespace where the Launchers are defined

2. Create an instance of ShareLinkTask and set the following property of the ShareLinkTask

  • Title – Title for the Link
  • Message – The status / message to be posted
  • LinkUri – The URL to be shared
private void button1_Click(object sender, RoutedEventArgs e)
{
ShareLinkTask shareLinkTask = new ShareLinkTask();
shareLinkTask.Title = "@WinPhoneRocks";
shareLinkTask.LinkUri = new Uri("http://developerpublish.com", UriKind.Absolute);
shareLinkTask.Message = "My Windows Phone website...";
shareLinkTask.Show();
}

3. Run the Application and click the button , you should see a form to share the Link …

 

How to Share Link with the ShareLinkTask in Windows Phone ?

How to Share Link with the ShareLinkTask in Windows Phone ?

 

How to Share Link with the ShareLinkTask in Windows Phone ?

How to Share Link with the ShareLinkTask in Windows Phone ?

 

Leave a Reply