
or years, online chat has been progressively and swiftly revolutionizing how you communicate with friends, family, coworkers, and businesses you deal with. It is the foundation of the original chat room concept and the heart of instant messaging applications. Online chat—also called instant messaging or just "IM"—connects people for one-to-one or group chats, for social networking purposes, or for business directives, such as enabling access to technical support, customer services, or sales. Now, Windows Live Messenger lets you add IM and social support to your web applications through a rich set of features offered by the Windows Live Messenger IM Control, the Windows Live Messenger Presence API, and the Windows Live Messenger Library.
Extending Windows Live Messenger features to the web makes it possible for personal sites, community sites, and business applications to increase their reach and interactivity with visitors. For community sites such as your blog, or other social networking sites, this could mean sharing your online messenger presence so that visitors can easily contact you. You can also supply fully functional or completely customized web-driven instant messaging features from your site or web applications to enhance this interactive experience. You can apply the same ideas to business applications in the form of supplying technical support directly from the corporate site or interacting with other departments or personnel. In either case, an important benefit of web-enabled Windows Live Messenger is that it allows visitors that don't use Windows Live Messenger to interact with other Windows Live Messenger users, without installing the Windows Live Messenger Client.
The Windows Live Messenger IM Control provides a quick and easy way for non-developers to enable their presence on the web, and is particularly useful for chatting with anonymous visitors.
|
|
The Windows Live Messenger family's new suite of offerings include three major packages that support several different web-enabled scenarios:
- Windows Live Messenger IM Control: Enables web applications to show the online presence of a Windows Live ID account to visitors and allows those visitors to interact with the account through a web-based instant messaging control. This interaction can be anonymous, or visitors can identify themselves by name or by their Windows Live account.
- Windows Live Messenger Presence API: Enables site visitors to log in to their Windows Live ID account and enable web applications to access their online presence. This facilitates non-anonymous interactions with the IM Control.
- Windows Live Messenger Library: Makes it possible to build web applications that integrate with Windows Live Messenger with more granular control over the UI and underlying instant messaging features exposed to visitors.
While the IM control and presence API are the easiest to implement and do not require development experience, the Messenger Library provides a rich set of features that require developers to provide the UI and programmatically control all interactions with Windows Live Messenger. Each has its place in the community; which ones you should use depends on the goals of your web application. This article will explain when and how to incorporate the IM control, presence API, and Messenger Library in your web applications, and provide common scenarios where each is distinctly useful.
Introducing the Windows Live Messenger IM Control and Presence API
The Windows Live Messenger IM Control was released in November 2007. This control is a fantastic addition to a blog, a web site, or any other space on the web where you want to communicate your online presence or allow visitors to communicate with you when you are signed in to a Windows Live Messenger client. Visitors can communicate with you anonymously, using a specified name, or in a more personal way by first logging in to their Windows Live account, thus making it possible for you to add them to your contact list for future communications. The Windows Live Messenger Presence API compliments the IM control, released in December 2007. It lets you explicitly invite visitors to log in to their account and share their online presence so that your web application can identify them. Both of these products are easy even for non-developers to include on web pages. The following sections explain how to work with the IM control, and then show you how to add value with the presence API.
IM Control Features
 | |
| Figure 1. Create HTML Page: From the Create HTML page in Web Settings you can configure the IM control's appearance and copy the resulting HTML to any web page. The Windows Live Messenger IM Control lets you share your presence as a status icon, a button, or by presenting an IM window. |
You can host the Windows Live Messenger IM Control on any web page. The control lets visitors reach you when you are logged in to the Windows Live Messenger client application. Visitors can see your online presence and—when you are online—can send messages through the IM control, which you receive through your messenger client. What's particularly compelling about the IM control is that you can let any visitor communicate with you—they don't have to log in, they don't have to have a Windows Live ID account, and they don't have to have the messenger client installed; they can even communicate anonymously. This is unlike the user experience with the messenger client, which requires all users to log in before they can send messages to one another. The IM control is perfect for enabling chat with visitors to your web application so you can answer questions or discuss topics, without adding the visitors to your contact list.
You can share your online presence with the IM control in three different ways: using a status icon, a button, or an IM window (see
Figure 1). The status icon and button give you the freedom to preserve real estate on your web page, yet still supply a way by which visitors can chat with you. Clicking the status button opens a new browser window that contains a fully functional IM window ready to begin a chat session. When you are online, the IM window is enabled so that visitors can send messages, otherwise it is disabled.
To set this up, you need to generate the appropriate HTML for the IM control according to how you prefer to share your online presence within your web application.
Browsers that support the IM control include IE 6, IE 7, and Firefox 2.0 on Windows or Mac OSs. In addition to controlling how you share your online presence with visitors, you can also personalize the control's appearance and culture settings. When you generate the HTML for the control, you can choose a template to initialize font and color properties to match your web application's appearance. The control is localized to 32 languages, so by simply setting a property you can adjust the language presented to your visitors.
| Editor's Note: This article was first published in the "Windows Live" edition of CoDe Focus Magazine (2008, Vol. 5, Issue 2), and is reprinted here by permission. |