wp7 skydrive upload
Next, head over to https://manage.dev.live.com/Applications/Index and add an application. This will provide you with an application Id and a client secret token. You also need to configure a valid redirect url as required by the OAuth handshake.
Add a reference to Microsoft.Live and Microsoft.Live.Controls. (included with the SDK)
Add a SignInButton to your page.
<pre class="code"><Controls:SignInButton x:Name="signInButton" Height="120" ClientId="XXXXXXXXXXXXXXXX" SessionChanged="SignInButtonSessionChanged" Scopes="wl.skydrive_update" RenderTransformOrigin="0.5,0.5" d:IsHidden="True"> </pre>
Now, you should be able to click on the sign in button, get redirected to the live login page. After logging in you will be required to give consent for the requested authorisation. This will look like this:</span>
We then wire up a handler to the SignInButton SessionChanged event and if the sign in was successful we will get a LiveConnectSession object passed in the event.
if (e.Status == LiveConnectSessionStatus.Connected) { VisualStateManager.GoToState(this, "SignedIn", true); _liveConnectSession = e.Session; }
A LiveConnectClient object can be constructed from the session object and used to carry out standard operations, i.e. upload, delete, copy, etc.
Find the project here:
Comments