我怎样才能打开Facebook应用程序,以便共享WP8的链接? [英] How can I open the Facebook App for sharing a link on WP8?

查看:155
本文介绍了我怎样才能打开Facebook应用程序,以便共享WP8的链接?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不知道如何打开官方的Facebook应用程序从Windows Phone上的我的C#code共用一个URI。常见的URI的计划,比如FB://可以打开应用程序,但没有参数似乎工作。我心里有这样的事情,但它不会为我工作:

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"));

当然,我知道,我可以使用 ShareTask 但是这不是我想要的。
你可以看一下Spotfy应用程序,它不正是,我想做的事,分享歌曲时。

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.

感谢您的帮助和解答!

PS:与Twitter同样的方式...

PS: Same with Twitter by the way...

推荐答案

我终于解决了!
我花了近两天来找到解决方案,它不记录任何地方sothat我想与大家分享我的结果:

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"));

我觉得这是一个非常酷的功能,并提醒它是如何工作的其他plarforms用户。

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

总之,从您的应用程序通过URI方案启动其他应用程序始终是一个不错的用户体验有很大的场景。

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

提示通过URI方案打开官方Facebook应用程序至少需要4.1版本

这篇关于我怎样才能打开Facebook应用程序,以便共享WP8的链接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆