Angus has posted information on his blog about how to incorporate an IM chat window in a website, for example a blog. The Windows Live™ Messenger IM Control lets people on the Web reach you in Messenger by showing your Messenger status on your web site, blog, or social networking profile.
The IM Control runs in the browser and lets site visitors message you without installing Messenger first.
It is supported in IE6, IE7, and FireFox 2.0 on Windows and FireFox 2.0 on Mac OS and supports 32 languages.
The Windows Live™ Messenger Presence API is a JSON API which returns a users status & display name, this can be queried programmatically.
There will be a Quick App demonstrating this linked from http://codeplex.com/wlquickapps in the next couple of days.
To use the IM Control:
- Go to http://settings.messenger.live.com/applications/websettings.aspx. Sign in with your Windows Live ID as needed.
- Turn on your Web settings to show your presence and receive IM from the Web.
Note that if you turn on Web settings, anybody on the Web can see your presence and send you IM messages.
- Pick a way to show your presence.
- Copy the HTML from the page and post it on your Web site.
- When a visitor comes to you page, they can click on “Begin a conversation” to start sending you IM.
Testing the IM Control
- You can test the IM Control right from the Copy HTML page above: http://settings.messenger.live.com/Applications/CreateHtml.aspx
- Note that you cannot IM yourself from the Web (just as you can’t IM yourself in the Messenger client).
- To test sending a message to yourself, send a message as “Visitor” or “Send anonymous message”.
- The IM Control lets anybody on the Web IM you. If somebody you don’t know sends you a message, you will see a warning like below in Messenger. The IM Control lets people you don’t know reach you. If you don’t want people you don’t know to send you messages, then don’t allow messages such as this one. If you want to always enable new users to IM you from the IM Control, then allow messages from unknown senders.