Saturday, June 28, 2014

LiveSDK don't work on Windows (Phone) 8.1?

I have download the version 5.6 of LiveSDK.


But this simple program don't work:





bool connected = false;
try
{
var authClient = new LiveAuthClient();
LiveLoginResult result = await authClient.LoginAsync(new string[] { "wl.signin", "wl.skydrive" });

if (result.Status == LiveConnectSessionStatus.Connected)
{
connected
= true;
var connectClient = new LiveConnectClient(result.Session);
var meResult = await connectClient.GetAsync("me");
dynamic meData = meResult.Result;
}
}
catch (LiveAuthException ex)
{
// Display an error message.
}
catch (LiveConnectException ex)
{
// Display another error message.
}
catch (Exception ex)
{
}


I catch a generic Exception, obtain this exception message:


Object reference not set to an istance of an object


in row :



LiveLoginResult result = await authClient.LoginAsync(new string[] { "wl.signin", "wl.skydrive" });


but authClient is not null. What is wrong?





CP http://ift.tt/1lWCzDC


No comments:

Post a Comment