1

currently I working on a portal project for getting calendar data from several websites (google, yahoo, live/hotmail). the problem is our application require a service that getting calendar data from those websites. my team already get rid the google and yahoo calendar, but now we having problem with live calendar.

so far here is what we already tried and failed:

  1. Grabbing data using HTTP Request seems impossible because the http://login.live.com totally secured using javascript. we spent 3 days to understand the JS to login but seems microsoft far better than us :)
  2. Searched through the net about LIVE CONNECT API, but now way to dynamically login (by providing username/password) to MS Live. We can't use the Live Login Button because our process done one service layer. (or perhap i miss something?)

is there any chance for me to complete this task?

any help, clue, trick will highly appreciate, thanks

NOTE: our application clients is in a small network and they agree if we managed their LIVE/YAHOO/GOOGLE account.

bonjorno
  • 201
  • 2
  • 12

2 Answers2

1

The answer is NO!, you can't get calendar/events from MS LIVE by providing Email/Password because MS LIVE using OAUTH.

the best way you can do is, from your client application you show up the live OAUTH login then get the authentication tokken from there. then pass the authentication token to the server side. to get the calendar or events you require.

here is the step:

Get your application client id

go to: https://manage.dev.live.com/Applications/Index

Create login form

on your client side application you create a login form by showing an browser control the url is:

https://oauth.live.com/authorize?response_type=token&client_id=YOUR_APP_CLIENTID&scope=SCOPE&locale=en&redirect_uri=https://oauth.live.com/desktop&auth_redirect=true&wa=wsignin1.0

  • YOUR_APP_CLIENTID: the client id you get from the registration on the first step.
  • SCOPE: should be wl.calendars+wl.basic see more on documentation

then after user allow the authentication, the browser will redirected to:

https://oauth.live.com/desktop#access_token=ACCESS_TOKEN
   &token_type=TOKEN_TYPE&expire=EXPIRE

there you can extract the ACCESS_TOKEN from there.

Grab The Calendar/Event

so now your client app already have ACCESS_TOKEN then pass this to your service to get the calendar (remember there are a time out for the ACCESS_TOKEN). Your service then should do the REST call to:

https://apis.live.net/v5.0/me/calendars?access_token=ACCESS_TOKEN

or

https://apis.live.net/v5.0/me/events?start_time=2012-10-01T00:00:00Z
     &end_time=2012-10-03T00:00:00Z&access_token=ACCESS_TOKEN

for more info refer to: http://msdn.microsoft.com/en-us/library/live/hh826523.aspx

Good Luck

ktutnik
  • 6,882
  • 1
  • 29
  • 34
0

From Microssoft Site....

Your apps can use the Live Connect APIs to create, read, update, and delete a Hotmail user's calendars. Your apps can also subscribe to public calendars, such as a list of holidays.

So i think this is the place for you go look at..Calendars (Live Connect API); And yes there are samples in C# as well.

Concept explanation... Basically you need to use public class LiveConnectClient that is available in windows 8 to get this done.

using Microsoft.Live;  
using Microsoft.Live.Controls;

Are the name spaces that contains core logic for live connect client and related operations.

Jigar Pandya
  • 6,004
  • 2
  • 27
  • 45
  • thank you for the reply, but i am not using windows 8. i have tried the example there (using silverlight). but from the example the login process invoke the browser and access the [ms live login](http://login.live.com) then get the session from it. in our case we can't do that because the login & getting data process is done on the service layer. or am i miss some point? – bonjorno Oct 03 '12 at 06:07