问题
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