Here's how to get started developing with the Windows Live Messenger Library. You can develop Messenger Library applications with the following languages:
- HTML and JavaScript
- C#, Silverlight, and JavaScript
- C# with Script#
HTML and JavaScript is the quickest way to get started with Messenger Library development.
Prerequisites:
- A site accessible through a full domain name. This is normally a site visible from the Internet, but you can also rig up a 'fake' domain name for testing on a local web server. Angus Logan has a good how-to.
- Channel.htm from the Messenger Library SDK. You'll need to host this file to enable cross-domain communication - that is, to let live.com talk through the browser to the JavaScript code you'll write.
- A Privacy Policy. The Messenger Library will check for a privacy policy before it lets the user sign in. You can create a placeholder file to get started - I just created Privacy.htm with the content "Insert Privacy Policy Here". Before deploying your application, you'll need to create a real privacy policy.
To get started, get the source code from the Messenger Hello World app. The Hello World app has three files:
- Privacy.htm
- Channel.htm
- Default.htm
Default.htm has all the source code for the application, including the HTML, JavaScript and CSS. Deploy these files to your web site and you're in business!
Load default.htm in your browser and click Sign In.
If it's not working
One more thing: if you're deploying the files to something other than the root directory of your site, you may need to change this line in default.htm:
_signin = new Microsoft.Live.Messenger.UI.SignInControl('signinframe', privUrl, chanUrl, 'en-US');
Change privUrl and chanUrl to the actual URL for privacy.htm and channel.htm. That should fix the problem.