Simple Skydrive demo

This demo uses OAuth2 and CORS (or JSONP) to make some REST calls which navigate the Windows Live Graph API to get some photos out of Skydrive. It is PLUGIN-FREE!

If running locally, register your development domain and replace WINDOWS_CLIENT_ID (below) with the client_id you are assigned

Build a login button

<button onclick="login()">Login</button>

Define the login function

Save a new access_token - if window location address includes one

Build an httpRequest handler function for CORS via XHR, falling back to JSONP

jsonp(): A cross domain scripting "hack"

Navigate the Graph: getAllPhotos is a recursive function which seeks out images stored in the users SkyDrive

If there is an access_token, fire off getAllPhotos, and print all images out to the screen