Hi Folks,
In this blog, we will cover two new interesting launchers which will help you in integrating your applications with the Social Networks like Facebook and Windows Live Messenger. In coming days, the same API might be used to integrate with Twitter and other social networking sites.
The two new launchers introduced in Mango are -
1. ShareStatusTask
2. ShareLinkTask
As their names denote, the ShareStatusTask helps you to share the status on Social Networks like Facebook and Windows Live Messenger. With help of ShareLinkTask, you can share the Web URL with the friends directly from you Windows Phone application!!
Note - These two launchers won't work on Emualtors. They can work if your Windows Phone is developer unlocked and you try running the code directly on the device by attaching it to computer (via USB) and then choosing "Windows Phone Device" as deployment target in Visual Studio IDE.
The following are the code samples to use these in your applications -
ShareLinkTask shareLinkTask = new ShareLinkTask();
shareLinkTask.Title = "Awesome music";
shareLinkTask.Message = "Listen to this folks!";
shareLinkTask.LinkUri = new Uri("http://www.youtube.com");
shareLinkTask.Show();
ShareStatusTask task = new ShareStatusTask();
task.Status ="I am developing on Mango!";
task.Show();
When you call the Show method, a screen will open where you will be asked to confirm the status message and social network you want to post the message. This is to avoid misuse of this feature.
Cheers!
In this blog, we will cover two new interesting launchers which will help you in integrating your applications with the Social Networks like Facebook and Windows Live Messenger. In coming days, the same API might be used to integrate with Twitter and other social networking sites.
The two new launchers introduced in Mango are -
1. ShareStatusTask
2. ShareLinkTask
As their names denote, the ShareStatusTask helps you to share the status on Social Networks like Facebook and Windows Live Messenger. With help of ShareLinkTask, you can share the Web URL with the friends directly from you Windows Phone application!!
Note - These two launchers won't work on Emualtors. They can work if your Windows Phone is developer unlocked and you try running the code directly on the device by attaching it to computer (via USB) and then choosing "Windows Phone Device" as deployment target in Visual Studio IDE.
The following are the code samples to use these in your applications -
ShareLinkTask shareLinkTask = new ShareLinkTask();
shareLinkTask.Title = "Awesome music";
shareLinkTask.Message = "Listen to this folks!";
shareLinkTask.LinkUri = new Uri("http://www.youtube.com");
shareLinkTask.Show();
ShareStatusTask task = new ShareStatusTask();
task.Status ="I am developing on Mango!";
task.Show();
When you call the Show method, a screen will open where you will be asked to confirm the status message and social network you want to post the message. This is to avoid misuse of this feature.
Cheers!
No comments:
Post a Comment