windows live technical development series part 3

21
Windows Live Development Series Session 3: User-Centric Services [presenter info]

Upload: kenneth-lee

Post on 28-Nov-2014

2.125 views

Category:

Technology


4 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Windows Live Technical Development Series   Part 3

Windows Live Development SeriesSession 3: User-Centric Services

[presenter info]

Page 2: Windows Live Technical Development Series   Part 3

Series Agenda

• Session 1: Overview– Platform overview, service access, integration

• Session 2: Site-Centric Services– Search, Virtual Earth, Silverlight Streaming, Expo

• Session 3: User-Centric Services– Live ID, Spaces, Photos, Contacts, Messenger,

Alerts

Page 3: Windows Live Technical Development Series   Part 3

Session Agenda

• Live ID• Spaces• Photos• Contacts• Messenger• Alerts

Page 4: Windows Live Technical Development Series   Part 3

Live ID

• Provides many advantages over custom authorization– User experience– Scalability and availability– Security– Supports CardSpace

• Multiple implementation options available– Client SDK– Web SDK– Relying Party Suite (RPS) SDK

Page 5: Windows Live Technical Development Series   Part 3

Live ID Authentication Process

Browser 3rd Party Server

Live Login Server

1. User requests page

2. Site returns sign-in link or forwards to sign-in page

3. User is directed to login.live.com and signs in using credentials4. Upon

authentication, user is redirected back to original site with a FORM POST parameter

5. Site verifies sign-in by processing FORM POST6. Site logs user in locally and treats user as authorized

Page 6: Windows Live Technical Development Series   Part 3

Live ID: Client SDK• Enables Live ID authentication from

non-browser applications• Provides Live ID CID that can be used

for accessing other services• Sample code:// These should be kept alive since tickets expire when they dispose.IdentityManager identityManager =

IdentityManager.CreateInstance("AppID", "AppName");Identity identity = identityManager.CreateIdentity( /* Optional username */ );

// Somewhere else in code...

if (identity.Authenticate()) { /* Logged in */ }else { /* Authentication failed */ }

Page 7: Windows Live Technical Development Series   Part 3

Live ID: Web SDK• Breadth integration Web scenario

– Easy to set up and configure– No account approval– No compliance review

• Each account receives a unique ID for each user upon login– Cannot share data behind the scenes

• Provides single sign-on with other Live services

Page 8: Windows Live Technical Development Series   Part 3

Live Authentication: RPS SDK

• Depth integration Web scenario– Full branding of login.live.com screen– Uses common Live ID CID of user– Requires significant development and

configuration

• Access to SDK requires Microsoft approval• Production deployment requires Microsoft

compliance review

Page 9: Windows Live Technical Development Series   Part 3

Spaces Blog APIs• URL

– Sends user to Spaces site to perform tasks– BlogIt API

• http://spaces.live.com/BlogIt.aspx?Title=<BlogTitle>& SourceURL=<URL>&description=<Description>

– Social Networking APIs• Invite Friend

– http://spaces.live.com/api.aspx?wx_action=/friends.aspx& name=<DisplayName>&cid=<CID>

• Add Friend• View Friend• View Pending Requests

• MetaWeblog– Requires Email Publishing to be enabled on Space

Page 10: Windows Live Technical Development Series   Part 3

Spaces RSS Feeds• Top Level (all blog entries, albums, and lists)

– http://<alias>.spaces.live.com/feed.rss– http://spaces.live.com/viewrss.aspx?cid=<CID>

• Minimal Feed (lists available feeds)– http://<alias>.spaces.live.com/minimal/feed.rss

• Blog Feeds– http://<alias>.spaces.live.com/blog/feed.rss (all entries)– http://<alias>.spaces.live.com/category/<CategoryID>/feed.rss (category feed)– http://<alias>.spaces.live.com/blog/<BlogEntryID>/feed.rss (comments feed)

• Photo Feeds– http://<alias>.spaces.live.com/photos/feed.rss (all albums feed)– http://<alias>.spaces.live.com/photos/cns!<AlbumID>/feed.rss (album feed)– http://<alias>.spaces.live.com/photos/<PhotoID>/feed.rss (comments feed)

• Profile Feed (lists published user data, such as display and contact info)– http://<alias>.spaces.live.com/profile/feed.rss

• Friends Feed (lists published friends)– http://<alias>.spaces.live.com/friends/feed.rss

• List Feeds (lists published lists)– http://<alias>.spaces.live.com/lists/cns!<ListID>/feed.rss– http://<alias>.spaces.live.com/Music/cns!<ListID>/feed.rss

Page 11: Windows Live Technical Development Series   Part 3

Spaces Photo APIs

• Control• URLs & images may not be cached for more

than 30 days per TOU

Page 12: Windows Live Technical Development Series   Part 3

Spaces Photos Control<html xmlns="http://www.w3.org/1999/xhtml" xmlns:devlive="http://dev.live.com"><body> <script type="text/javascript" src="http://controls.services.live.com/scripts/base/v0.3/live.js" /> <script type="text/javascript" src="http://controls.services.live.com/scripts/base/v0.3/controls.js" /> <script type="text/javascript"> function signIn() { } function signOut() { } function showError(message) { } function receiveData(photoData) { alert(photoData[0].fileExpiringURL); } </script>

<devlive:spacescontrol id="SpacesControl" devlive:privacyStatementURL="http://g.msn.com/2privacy/enus" devlive:market="en" devlive:dataDesired="fileExpiringURL,fileAccessControlledURL" devlive:onSignin="signIn" devlive:onSignout="signOut" devlive:onError="showError" devlive:onData="receiveData" devlive:channelEndpointURL="channel.htm" /></body></html>

Page 13: Windows Live Technical Development Series   Part 3

Contacts

• 3 levels of integration– Hands-off• Provide control for “Tell a friend” features

– Light• Use control callbacks to retrieve user selected data• Use AJAX to pull data back to server if needed

– Deep• Use REST API to access virtually anything

• Emails and data may not be cached for more than 30 days per TOU

Page 14: Windows Live Technical Development Series   Part 3

Contacts Control<html xmlns="http://www.w3.org/1999/xhtml" xmlns:devlive="http://dev.live.com"><body> <script type="text/javascript" src="http://controls.services.live.com/scripts/base/v0.3/live.js"></script> <script type="text/javascript" src="http://controls.services.live.com/scripts/base/v0.3/controls.js"></script> <script type="text/javascript"> function signIn() { } function signOut() { } function showError(message) { } function receiveData(contactData) { alert(contactData[0].Email); } </script>

<devlive:contactscontrol id="ContactsControl" devlive:view="tileList" devlive:market="en" devlive:onSignIn="signIn" devlive:onSignOut="signOut" devlive:onError="showError" devlive:onData="receiveData" devlive:dataDesired="name,email" devlive:channelEndpointURL="channel.htm" /></body></html>

Page 15: Windows Live Technical Development Series   Part 3

Messenger Presence & Web IM

• Presence• Web IM– Double blind anonymity

Page 16: Windows Live Technical Development Series   Part 3

Messenger Agents

• Request access via http://dev.live.com/agents/pilot.aspx

• Use BuddyScript to develop discussion guides• Support for SOAP, file data, and other data

sources• Encarta agent: [email protected]

Page 17: Windows Live Technical Development Series   Part 3

More Messenger Integration Points

• Activities– JavaScript API

• Add-ins• Content– Emoticons, winks, backgrounds, etc

Page 18: Windows Live Technical Development Series   Part 3

Alerts

• Setup– Email [email protected] for access– API access locked down by IP

• SOAP API• RSS

Page 19: Windows Live Technical Development Series   Part 3

Sample Alert Signup Process

Browser 3rd Party Server

Alerts Server

1. User asks to sign up for Alert on 3rd party site

2. Site asks Alerts for URL to register user for Alerts using a site-unique username

3. Alerts provides URL for user to configure Alerts delivery options

4. Site provides configuration URL to user

5. User visits Alerts site to select delivery options

6. User is returned to URL provided by 3rd party site

Page 20: Windows Live Technical Development Series   Part 3

Sample Alert Delivery Process

Browser 3rd Party Server

Alerts Server

1. Message invoked by user or other source

2. Site calls SOAP API with message details

3. Alerts delivers messages to user-specified endpoints

Page 21: Windows Live Technical Development Series   Part 3

Summary

• Live ID• Spaces• Photos• Contacts• Messenger• Alerts