More servicesWindows Live
HomeHotmailSpacesOneCare
 
MSN
Sign in
 
 
Spaces home  Spaces Developer Platfor...ProfileFriendsBlogMore Tools Explore the Spaces community

Blog

October 16

Windows Live Events: Create Event API and Event RSS

You’ve probably heard about the launch of Windows Live Events, but unless you’ve been using a web debugging proxy like Fiddler, you probably didn’t know that there’s a way to programmatically instantiate a Windows Live Event.  Try clicking this link:

http://spaces.live.com/api.aspx?wx_action=createEvent&wx_targetSite=eventSpace&wxp_name=Movie+Night:+Live+Free+or+Die+Hard&wxp_alias=livefreeordiehard&wxp_contactName=John+Smith&wxp_contactPhone=206-555-1212&wxp_location=Space+Needle&wxp_address=4th+Ave.+and+Broad+St.+in+Seattle&wxp_latlong=47.62061,-122.34942&wxp_mapType=h&wxp_mapZoom=18&wxp_description=%3cimg%20src='http://entimg.msn.com/i/150/mo/OneSheets/new3/LiveFreeorDieHard.jpg'%3e&wxp_template=IIEventOscarParty.xml

API Details
The link should have taken you to an event create page with all of the specified parameters pre-populated.  Yep, it’s a long link, but it’s intended to show all of the parameters (most of which are optional.)  Here’s the link in a more read-able format:

http://spaces.live.com/api.aspx
?wx_action=createEvent
&wx_targetSite=eventSpace
&wxp_name=Movie+Night:+Live+Free+or+Die+Hard
&wxp_alias=livefreeordiehard
&wxp_contactName=John+Smith
&wxp_contactPhone=206-555-1212
&wxp_location=Space+Needle
&wxp_address=4th+Ave.+and+Broad+St.+in+Seattle
&wxp_latlong=47.62061,-122.34942
&wxp_mapType=h
&wxp_mapZoom=18
&wxp_description=%3cimg%20src='http://entimg.msn.com/i/150/mo/OneSheets/new3/LiveFreeorDieHard.jpg'%3e
&wxp_template=IIEventOscarParty.xml

As you can see, parameters are URL encoded.   The mapping parameters (mapType, mapZoom) are consistent with Virtual Earth.  Check out their interactive SDK for more info. 

Potential uses
Below are just a few ideas for how you might use the Create Event API:

  • If you own a site that lists local events or venues like MSN CityGuides or eventful, the Create Event API will hopefully help you enable your users to easily create Windows Live Event spaces to invite their friends to the events that you listed
  • If you’re a local band, DJ, comic, etc., adding a create event link to your list of upcoming shows will make it easy for your fans to invite their friends
  • If you own a venue like a restaurant, bar, club, etc., consider adding a create event link to your website to help your visitors get their friends together at your establishment
  • If you’re a political candidate or advocacy organization, you could add a link to your website to make it easy for your supporters to create a coffee, house party, or debate watch party
  • If you’re an athletic team, you could add a great an event link to your game schedule so people could easily schedule an outing

These are just a few ideas for using the Create Event API.  I hope you find these useful and if you have feedback on the API or other suggestions for potential uses, please leave a comment.  Thanks—
--Rob

RSS
P.S. Publicly accessible events also include an RSS feed.  You can see this by adding /feed.rss to the event’s URL AND in additional to basic RSS elements like <title>, <link>, <description>, and <pubDate>; <geo> and <georss> elements are also included.

Update: 12 November 2007
Thanks to Thomas J. who pointed out the following:
* More full documentation will be posted on MSDN
* The "wx_targetSite" parameter is unnecessary

April 20

Spaces API, Feeds, and Gadget updates are here!

As you might have seen on TechCrunch or LiveSide, Windows Live Spaces released a new version of our service early this morning.  However, we didn’t just ship features this time around… We shipped a lot of new updates to our APIs, RSS Feeds, and Gadget support.  Additionally, we will be spending some time at Mix07 this year talking about why developers should start partying on our platform. 

We will be updating this site in the coming days to bring you API, Feed and Gadget documentation that will help you start building some cool mashups, or gadgets on Spaces.  Until then, check out some of the feeds we added and the new features for gadget support.  Of course, if you have questions or comments, visit our forums, drop us a line at spgadgfb@microsoft.com or leave me a message on my space

Enjoy!

John

RSS Feed Updates – We added several feeds with this new release. Each public space that syndicates will offer these feeds.  Just substitute your alias in the examples below and you are ready to go!  

  • Top Level Feed – <youralias>.spaces.live.com/feed.rss
  • Minimal Feed – <youralias>.spaces.live.com/minimal/feed.rss
  • Blog – <youralias>.spaces.live.com/blog/feed.rss (all blog categories contain sub feeds now)
  • Photo Albums – <youralias>.spaces.live.com/photos/feed.rss (each album has a sub feed with photos)
  • Profile – <youralias>.spaces.live.com/profile/feed.rss
  • Friends – <youralias>.spaces.live.com/friends/feed.rss
  • Updated Spaces - spaces.live.com/changes.aspx (provides XML feed of recently updated spaces)

Gadget Updates – We added the ability for gadgets to be configured with a initialization parameter when being added to a space.  Now, a simple RSS gadget could take a different feed URL when it’s added to a space rather than ask a user to configure one manually!

New APIs – We added several new APIs to our offering with this release, and will be providing documentation in the coming days on MSDN that speaks to how best to leverage them. 

 
  • Add Gadget
  • Add Module
  • Send Private Message
  • View Space
  • View Updated Spaces
  • View Settings
  • View Lists
  • View Communication Preferences
  • Add Friend
  • View Friends
  • Invite Friend
  • View Pending Requests
  • View Photos
  • View Profile
December 31

Secrets of Searching Spaces

(cross-posted from: http://thespacecraft.spaces.live.com/ as this may be interesting for Dev folks - Rob)

Have you ever wondered… wow, there’s all of that stuff (blogs, photos, profiles, lists, etc.) in Spaces, but I just can’t find what I’m looking for using the Spaces Search?  Well, I’m writing to share the Secrets of Searching Spaces.  It may come as no surprise to you that the Search experience on Windows Live Spaces is powered by Live Search.  We’re actually just using some publicly available features of Live Search.

Search Spaces Blogs

For starters, let’s say that we want to search for Spaces blog entries that talk about a specific topic, for example “Ms Dewey.”  Of course you could go to Spaces to do your search, but this is about exposing the “Secrets of Searching Spaces” so let me show you how to do this using Live Search:
1. Go to Live Search (http://search.live.com)
2. Enter “Ms Dewey site:spaces.live.com meta:search.pt(blogs)”

Now I’ll explain:
· “Ms Dewey” are your standard keyword search terms
· The “site:” parameter scopes your search to URL’s that start with that site
· The “meta:” parameter tells Live Search to look for the meta word “search.ptwhich containsblogs.”  Other “search.pt” metawords that you can use are “spaces” and “people” for the front page of a user’s space and the profile page respectively.  Nikhil, who was the developer of our original Spaces Search experience tells me that “pt” stands for page type.

Search within a Space

One of the feature requests I hear from time-to-time is for the ability to search within a specific Windows Live Space.  This can be done using the site: parameter.  For example: “Ms Dewey site:robdolin.spaces.live.com meta:search.pt(blogs)” will search within my personal space for any blog entries about “Ms Dewey.” 

Search within a Market

Another “secret” is to use the meta word “search.market” to search for spaces in a specific language or from a specific market.  This uses market identifiers like “en-us” for English-USA or “fr-fr” for French-France.  Windows Live Spaces supports about 35 markets (and hopefully more soon J.) 

List of Meta Words

Below I have included a list of meta words that you can query on:
· search.pt – page type; values of “spaces,” “people,” and “blogs”
· search.st – space title; for example “Rob Dolin’s space”
· search.sa – space alias; for example “robdolin”
· search.market – the market code; for example: en-us, es-es, en-au, fr-fr

What’s Next

I hope you use the above “secrets” to search Spaces (or other data.)  You might even want to build a Gadget or other mash-up.  You can also access the data in Live Search by adding “&format=rss” to your search query or by using Live Search’s SOAP API’s.  On the Spaces team, we’re working to expose additional meta words.  If you do build a great Gadget or mash-up, please leave a comment about it with this post.

Happy searching—
--Rob

November 09

Get/Set Preferences is here

As noted on The Spacecraft, we have released another update to Windows Live Spaces.
 
As I alluded to in my last post, Get/Set Preferences support has been added to the Gadget platform.
 
I can't wait to see the new gadgets that this update enables.
 
October 09

Windows Live Spaces gadget article on LiveSide

Donavon West posted an article on LiveSide last week discussing his view of the state of gadget development on Windows Live Spaces.
Donavon says that the lack of support for Get/Set Preferences as the biggest challenge facing developers. We agree .
 
I am happy to say that we are actively working on support for Get/Set Preferences. I can't give dates yet, but it is coming soon.
 
-- Greg Phipps
August 01

Gadget devs, come out and play!

 
Admit it. 
 
You've always thought MSN Spaces was pretty cool -- that we did some things right and would work hard to smooth out any rough edges over time.  But, you weren't sure if the Spaces team would ever let developers outside the company party in someone else's space.  Well, a big part of joining the Windows Live family today is support for web gadgets written by anyone including YOU!  Thanks to the great work done on Gadgets to date, you can now write a gadget that works both in Live.com (personalized portal) and Spaces (online expression/identity).  And, it only takes one person adding it to their space for your gadget to become popular -- visitors to that space can choose "Add to your space" or "Add to Live.com" right from the header of the gadget, then visitors to that space can add to their spaces, and it's off to the races!
 

What kind of gadget makes sense in a space?
 
Remember that the Live.com portal is about YOU catching up on the world.   Spaces is about the world (however big or small you define it with the permissions you set) catching up on YOU.  Users will decide which gadgets are worthy of adding to their space or not, and given our experience with Spaces features to date, the ones that will be the most successfull will be:
Customizable -- let the space author personalize the gadget so their instance of it is different than another Spaces user's instance.  This could be as simple as letting the space author select the city they want to show weather for OR as complicated as pulling the user's account data in from another service (ie, his/her Netflix queue). 
 
Reflective of the author's personality -- a gadget that helps the author to be creative with little or no work is more relevant than one that lets a visitor come to a space and check their mail account or convert their currency.  All of those gadgets are killer apps; it's just the ones that are more like sharing your photos or music tastes will probably be more popular. 

Adaptive to our rich themes/layouts -- after adding your gadget to your own space for testing, try selecting a bunch of dark and light themes AND moving the gadget between our narrowest and widest columns to make sure it works well in all scenarios.  You want that puppy to shine!
 
How do I get started?

1.  Build a Windows Live web gadget according to the SDK available at the Windows Live Dev site
 
2.  If your gadget has any settings/edit UI that visitors shouldn't see, then use the following code to detect whether Spaces is running the gadget in author mode and show/hide the UI accordingly.  There is a p_args argument outlined in the gadgets SDK and we've added a new method off of that called getMode().  You can do a simple comparison of the value returned from that method call to determine author vs. visitor mode.  
Something like the following:
          
         foo = function(p_elSource, p_args, p_namespace)
         p_args.module.getMode() == Web.Gadget.Mode.author
3.  Add the gadget to your own space using the following Spaces API: 
 
Switch between "Edit your space" and "View your space" to see how it behaves in both author and visitor modes.  If your manifest file, Javascript, and CSS are hosted anywhere but Windows Live Gallery (gallery.live.com), the gadget can only be added for editing/viewing by the space owner.  It will be hidden to visitors.    
4.  Zip up your manifest file and supporting Javascript/CSS files and submit that gadget package to the Windows Live Gallery so other visitors can add it to their space by going to Customize --> Modules --> "Add gadgets from Windows Live Gallery".  Once it has been verified to work in each service, it will appear in the Gallery for users to add to Live.com or Spaces.  Make sure you use relative URLs (mygadget.css instead of http://foogadgetdeveloper.com/mygadget.css) in your manifest XML to point to the scripts/CSS or the gadget will be rejected during verification.    
 
5.  If you upload a cool gadget to Gallery that you think will be a hit with Spaces users, comment on this post or send mail to spgadget@microsoft.com.   Same thing applies if you have feedback or feature requests for making gadget development for Spaces better.
We'll be updating the Gadgets SDK and sample code on dev.live.com very soon to reflect the additional Spaces items.  In the meantime, you have everything you need above.
 
Good luck stormin' the castle!
 
June 15

Tim Bray on Microsoft LifeCams and Window Live

Tim Bray has a blog post entitled Blogging Cam: Almost Right where he writes

Via Niall Kennedy (who’s been very good lately): Microsoft cameras that have one-button publishing to MSN Spaces. This is so wrong. I don’t want to see a future in which your camera is LiveJournal-enabled or Facebook-ready. When I get a computer or a mobile device, it’s either Web-ready or not, it doesn’t have to be MSN-enabled or Yahoo-blessed.

I agree 100%. I worked on the APIs for MSN Spaces and this was one of my goals. The APIs we expose should be industry standards (de facto or de jure) and we shouldn't think of APIs as being the purvey of exlusionary deals. We are waiting for some things to pull together such as the the Windows Live ID client SDK before announcing more APIs. In the meantime, you can assume that any public APIs we provide will be available to all at not exlusionary.     

-- Dare Obasanjo

June 09

Build Mashups using MSN Spaces feeds

One of the coolest trends on the Web has been the rise of RSS feeds for syndicating content on the Web. Why this trend is so interesting is that RSS feeds can be used both as a way to read content in your application of choice people and as an engine to remix content in mashups of your choice.

Every public MSN Space can provide an RSS feed that contains the most recent blog entries, lists, and photo albums posted to the space. To distinguish between the various item types in the RSS feed, an extension element named msn:type from the "http://schemas.microsoft.com/msn/spaces/2005/rss" namespace is used. The valid values for the msn:type element are photoalbum, blogentry, list, musiclist, booklist, and bloglist. For this application I targeted items within the RSS feed for which the value of the msn:type element was "photoalbum".

One mashup I've created powered by the RSS feeds from MSN Spaces has been the MSN Spaces Photo Album Browser which allows you to browse photos in photo albums on MSN Spaces. I've also wrote an article entitled Fun with IXMLHttpRequest and RSS about writing mashups with RSS feeds provided by MSN services such as MSN Search and MSN Spaces. Check it out, it may give you some ideas for interesting mashups of your own.

-- Dare Obasanjo