I am trying to follow a sample on MSDN to read the properties of a folder on onedrive, but I am running into some errors.
Here is the tutorial I am following: http://msdn.microsoft.com/en-us/library/live/hh826522.aspx#reading_albums
The error I get when I run the code says:
"Error 1 'testRun.MainPage' does not contain a definition for 'session' and no extension method 'session' accepting a first argument of type 'testRun.MainPage' could be found (are you missing a using directive or an assembly reference?) C:\Users\me\Desktop\project"
Am I missing something I have to run before I click the button? The only thing that fails is the "this.session" parameter. I am barely learning the LiveSDK so I'm not sure if I'm missing a reference or what. Thanks for any and all help :)
My Code:
private async void Button_logIn_Click(object sender, RoutedEventArgs e)
{
try
{
LiveConnectClient liveClient = new LiveConnectClient(this.session);
LiveOperationResult operationResult =
await liveClient.GetAsync("path/to/folder");
dynamic result = operationResult.Result;
this.Textblock_status.Text = string.Join(" ", "Album name:", result.name, "ID:", result.id);
}
catch (LiveConnectException exception)
{
this.Textblock_status.Text = "Error getting album info: " + exception.Message;
}
}