get windows phone user accounts

2019-04-11 14:41发布

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条回答
Viruses.
2楼-- · 2019-04-11 15:16

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.

查看更多
登录 后发表回答