Microsoft Live Connect Api - Authorization Issue

238 views Asked by At

I am developing a demo app on Windows Phone 8 using the Microsoft Live Connect Api to access the sky drive.

Below is my code :

In Xaml :

<live:SignInButton Name="skyBtn" ClientId="MY_Client_Id" Scopes="wl.basic" Branding="Skydrive"  TextType="Login" Margin="109,403,153,131" SessionChanged="skyBtn_SessionChanged"/>

I have used built in button to sign in.

In xaml.cs :

private void skyBtn_SessionChanged(object sender, LiveConnectSessionChangedEventArgs e)
{
    if (e.Status == LiveConnectSessionStatus.Connected)
    {
      session = e.Session;
      client = new LiveConnectClient(session);
      tbMessage.Content = "Connected!";
    }
}

Basically my problem is on
if (e.Status == LiveConnectSessionStatus.Connected) line

Status always come unknown

I have searched a lot but I'm not able to solve this.

1

There are 1 answers

4
Andras Csehi On

Make sure you declare internet access for your application.

<Capabilities>
  <Capability Name="ID_CAP_NETWORKING" />
  <Capability Name="ID_CAP_WEBBROWSERCOMPONENT" />
</Capabilities>