I am trying the code to find out whether the user has already signed in or not?
LiveAuthClient LCAuth = new LiveAuthClient();
LiveLoginResult LCLoginResult = await LCAuth.InitializeAsync();
Even if the user has already logged in, it returns Unknown.
What is the problem with this?
LiveAuthClient authCilent = new LiveAuthClient();
LiveLoginResult loginResult;
loginResult = authCilent.InitializeAsync().Result;
if (loginResult.Status == LiveConnectSessionStatus.Connected)
{
/*
Also use loginResult.Session as the Session which you will require to use live services by creating LiveConnectClient instance as follows.
*/
// LiveConnectClient liveClient = new LiveConnectClient(loginResult.Session);
// Write the logic you want by using liveClient instance
}
I had tried this snippet and it worked for me. Cheers
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With