c# - LiveSDK onedrive - How to read an album -


i trying follow sample on msdn read properties of folder on onedrive, running errors.

here tutorial following: http://msdn.microsoft.com/en-us/library/live/hh826522.aspx#reading_albums

the error when run code says:

"error 1 'testrun.mainpage' not contain definition 'session' , no extension method 'session' accepting first argument of type 'testrun.mainpage' found (are missing using directive or assembly reference?) c:\users\me\desktop\project"

am missing have run before click button? thing fails "this.session" parameter. barely learning livesdk i'm not sure if i'm missing reference or what. , :)

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;             }         } 

the session object stored in liveauthclient object when user logged in: http://msdn.microsoft.com/en-us/library/microsoft.live.liveauthclient.session.aspx

from error, looks session not method of current page, makes inaccessible method. you'll want store session object somewhere methods can access after user logs in.


Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -