get windows phone user accounts

若如初见. 提交于 2020-01-13 05:09:27

问题


I'm trying to get windows phone user accounts (live, facebook, twitter, linkedin...) in c# for windows phone, so i found this:

http://msdn.microsoft.com/en-us/library/windowsphone/develop/microsoft.phone.userdata.account(v=vs.105).aspx

and I wrote this code:

    public MainPage()
    {
        InitializeComponent();

        Account account = new Account();
        account.Kind = StorageKind.Facebook;
        MessageBox.Show(account.Kind.ToString());
        account.Name = EmailAddressKind.Personal.ToString();
        MessageBox.Show(account.Name);
    }

    public sealed class Account
    {
        public StorageKind Kind { get; internal set; }
        public string Name { get; internal set; }
    }

but now I'm stuck I cannot get the value of the email that i need, for example, thanks

P.S. I'm talking about personal accounts not contacts accounts ;)


回答1:


It is not possible to retrieve the user's email address from code - you can prompt them for the email associated with an account (to make it easier), but can't retrieve it yourself.



来源:https://stackoverflow.com/questions/13510355/get-windows-phone-user-accounts

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!