WP7 Mango Features #5: ShareLinkTask

by CameronM 15. August 2011 07:30

 

In my last post I looked at how easy it was to add the ability to update your status on social networks such as Windows Live, Twitter and Facebook. An obvious extension of a simple status update is the ability to add a web link. This scenario is supported by most major social networks and it only seems fitting that Windows Phone Mango now offers developers an easy way to achieve the same results.

private void Button_Click(object sender, RoutedEventArgs e)

{

    ShareLinkTask link = new ShareLinkTask();

    link.Title = "TrafficMATE";

    link.LinkUri = new Uri("http://blog.ezidata.com.au/post/Connect-your-app-to-the-Social-Network.aspx");

    link.Message = "Traffic Incidents via twitter in Windows Phone Mango #wp7";

    link.Show();

}

 

As with the previous post, the ShareLinkTask only works on a real device, as it relies on the social networks you have linked to the Live account on your Windows Phone. When run on the device, users are again prompted to select which social networks to post the link to and can select from whatever account that currently have linked.

 

 

Tags: , , , ,

WP7