我正在尝试使用代码来确定用户是否已经登录?
LiveAuthClient LCAuth = new LiveAuthClient();
LiveLoginResult LCLoginResult = await LCAuth.InitializeAsync();
即使用户已经登录,它也会返回未知。
这有什么问题?
我正在尝试使用代码来确定用户是否已经登录?
LiveAuthClient LCAuth = new LiveAuthClient();
LiveLoginResult LCLoginResult = await LCAuth.InitializeAsync();
即使用户已经登录,它也会返回未知。
这有什么问题?
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
}
我试过这个片段,它对我有用。干杯