How can I open the Facebook App for sharing a link on WP8?

I wonder how to open the official Facebook App for sharing an URI from my C# code on Windows Phone. The common Uri-Scheme like "fb://" may open the App but no parameter seems to work. I have something like this in mind, but it will not work for me:

LaunchUriAsync(new Uri("fb://publish/profile/me?text=foo"));

Of course I know that I could use the ShareTask but that's not what I want. You can take a look at the Spotfy App, it does exactly, what I want to do, when sharing a song.

Thank you for your help and answers!

PS: Same with Twitter by the way...


Solution 1:

I finally solved it! It took me nearly two days to find the solution and it is not documented anywhere sothat I would like to share my results with you:

// Open official Facebook app for sharing
await Windows.System.Launcher.LaunchUriAsync(new Uri("fb:post?text=foo"));

I think this is a very cool feature and reminds users of how it works on other plarforms.

In conclusion launching other apps from your app via URI schemes is always a great scenario with a nice user experience.

Hint: Opening the official Facebook App via URI schemes requires at least version 4.1!