Я не уверен, какая сборка является правильной для Windows Phone. Приведенный ниже URL-адрес показывает пример использования LiveSDK.
http://nikovrdoljak.wordpress.com/2011/09/15/backup-your-windows-phone-isolated-storage-data-to-skydrive-using-live-connect-api/
Я добавил Microsoft.Live
и Microsoft.Live.Control
для ссылок
Код:
client.Session.Status != LiveConnectSessionStatus.Connected
Ошибка:
'Microsoft.Live.LiveConnectSession' does not contain a definition for 'Status'
and no extension method 'Status' accepting a first argument of type 'Microsoft.Live.LiveConnectSession'
could be found (are you missing a using directive or an assembly reference?)
Код:
private LiveConnectClient client;
private void UploadPhoto_Click(object sender, EventArgs e)
{
if (client == null || client.Session == null || client.Session.Status != LiveConnectSessionStatus.Connected)
{
MessageBox.Show("You must sign in first.");
}
else
{
client.GetCompleted += new EventHandler<LiveOperationCompletedEventArgs>(GetFolderProperties_Completed);
// If you put photo to folder it becomes album.
client.GetAsync("me/skydrive/files?filter=folders,albums");
}
}