The share link task is used to enable the user to share a link on one or more social networks.
The ShareLinkTask
allows you to specify a link URI, title, and message, as shown in the following excerpt:
ShareLinkTask task = new ShareLinkTask
{
LinkUri = new Uri("http://linkd.in/jnFoqE", UriKind.Absolute),
Title = "Check out the Windows Phone Experts group.",
Message = "Interested in Windows Phone development? "
+ " Join the Windows Phone Experts group on Linked-In!"
};
task.Show();
When the task’s Show
method is called, the built-in link sharing app is launched, allowing the user to select various social networks, such as Facebook, Twitter, and LinkedIn.
The sample for the ShareLinkTask
is a page called ShareLinkTaskView
, which allows the user to enter a URL, title, and message, and to launch the ShareLinkTask
via an application bar button (see Figure 14.21).
Allowing users to share links with their contacts is a great way to connect your app with a wider audience.
3.147.126.122