How to use the share status task for Windows Phone 8

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Use the share status task to enable the user to share a status message on the social network of their choice.

By using Launchers, you help provide a consistent user experience throughout the Windows Phone platform. For more information, see Launchers and Choosers for Windows Phone 8.

Note

If your app exits immediately after calling Show()()() and before the share status task has launched, the share status dialog may not launch.

To use the share status task

  1. Add the following statement to your code.

    using Microsoft.Phone.Tasks;
    
    Imports Microsoft.Phone.Tasks
    
  2. Add the following code to your application wherever you need it, such as in a button click event. To test this procedure, you can put the code in the page constructor. This is the code to launch the task.

    ShareStatusTask shareStatusTask = new ShareStatusTask();
    
    shareStatusTask.Status = "I'm developing a Windows Phone application!";
    
    shareStatusTask.Show();
    
    Dim shareStatusTask as ShareStatusTask = new ShareStatusTask()
    
    shareStatusTask.Status = "I'm developing a Windows Phone application!"
    
    shareStatusTask.Show()
    

See Also

Reference

ShareStatusTask

Other Resources

How to use the share link task for Windows Phone 8