[英]How to get Windows 8 Live ID
Windows 8 uses Live ID as the user name. Windows 8使用Live ID作为用户名。 How do I get this LiveID in C#?
如何在C#中获取此LiveID?
Metro apps by design have restricted access to many information they shouldn't really need, and I think this might be one of them. 设计中的Metro应用程序限制访问他们不应该真正需要的许多信息,我认为这可能是其中之一。
WinRT gives access to Windows.System.UserProfile.UserInformation
class (as CodeCaster suggested), but as I checked, from all the methods there only GetDisplayNameAsync()
might return live id (email) and it's only if the first/last name are not set on the account. WinRT提供对
Windows.System.UserProfile.UserInformation
类的访问(如CodeCaster建议的那样),但是在我检查时,从所有方法中只有GetDisplayNameAsync()
可能返回实时ID(电子邮件),并且只有当名字/姓氏不是在帐户上设置。
(Also, most of the methods in this class require setting Enterprise Authentication capability, which is not really welcome in the Store . And the documentation of the class is currently poor.) (此外,此类中的大多数方法都需要设置企业身份验证功能,这在商店中并不受欢迎 。而且该类的文档目前很差。)
For single-sign-on experience , you might rather use Live Software Development Kit. 对于单点登录体验 ,您可能更喜欢使用Live Software Development Kit。
Take a look at the following post: 看看以下帖子:
http://www.silverlightshow.net/items/Using-the-Live-SDK-in-Windows-8-XAML-C-Metro-Applications.aspx http://www.silverlightshow.net/items/Using-the-Live-SDK-in-Windows-8-XAML-C-Metro-Applications.aspx
also on previous questions: 还有以前的问题:
Log in to desktop application by Windows Live ID 通过Windows Live ID登录桌面应用程序
Windows Live ID login via HttpRequest 通过HttpRequest登录Windows Live ID
也许Windows.System.UserProfile.UserInformation包含一些相关数据。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.