2

I am writing a metro app using javascript and HTML that implements the Share Contract. I want the users of my app to post data to Social networking sites like Facebook. I have configured the People app in my system, but i am not getting it(People app option) in the share pane in the charms bar. I am seeing the People app option in other apps that i have downloaded from the store.Any help in this regard would be highly appreciated.

Thanks

4

2 回答 2

5

Windows 8 Release Preview 的人物应用仅支持分享链接。Windows 8 RTM 的人物应用程序同时支持文本和链接共享。

分享文本:

request.Data.Properties.Title = "Share Text Example";
//Description is Optional
request.Data.Properties.Description = "A demonstration that shows how to share text.";
request.Data.SetText("Hello World!");

分享链接:

request.Data.Properties.Title = "Share Link Example";
//Description is Optional
request.Data.Properties.Description = "Demonstrates how to add a link (URI) to share.";
request.Data.SetUri(new Uri("http://www.google.com"));
于 2012-09-26T06:59:38.333 回答
2

共享列表中显示的应用程序取决于您共享的数据类型。每个目标应用程序都会通知 Windows 8 它能够接受哪些数据类型。Windows 将仅显示那些支持从源应用程序共享的数据类型的应用程序。例如,如果我只在全新安装系统上共享纯文本

request.data.setText("some plain text to share");

我只会看到邮件应用程序出现。

但是,如果我还共享一个 URI,我现在会看到 Mail 和 People 应用程序都出现了。

request.data.setText("some plain text to share");
request.data.setUri(new Uri("http://slickthought.net"));

我怀疑您所做的任何 set*() 调用都不是 People 应用程序支持的数据类型之一。

于 2012-08-21T12:43:31.337 回答