How to create a Windows Live Chat in your website?

1. Registry site and to obtain YOU GO Applicaition

Whenever we developed using the services of Windows Live we needed to acquire an identifier of the application, for it we must go to http://live.azure.com and to accede with a Windows Live YOU GO.

This portal can remember up to 20 different applications. In the page Summary it selects to the New option of services located in the right part superior.

This indicates the registry of a request within Live, selects the option to make live Sevicios: Existing API

The registry form is quite easy to fill, only must locate the following information.

* Service Component Label: Name of the site, the chat of control of this name will not be seen in the Web.

* Service Component Description: Description of the site

* Dominion: Page of Beginning of the application, without needing putting http://.

* Return URL: Page in which is the chat control.

Finally, it clicks in Creating and ready, after the inscription, the system shows the assigned identifier of application the site, this S-value necessary when to place the control in the page.

2. It Places the sequences of commandos, in the facilities of Control Chat and assigns YOU GO of the application.

Once registered in the site of Windows Live, to add the Control Chat to a website we must include three components.

Headed, tag htm page alias wl is placed to indicate that all the control that contains the subject of this information has a Javascript defined here. <html xmlns: wl= http://apis.live.net/js/2010 ″ >

Reference to the process of authentication of the Javascript. <script src= http://js.live.net/4.0/loader.js? ></script>

To Anywhere Add the control of chat of the body of the label of our page. <wl: chat-frame event-name=? <site name>? client-id=? <Application ID>? > In this last passage in the field of <Application ID> is due to place the value that allows to return directly to Windows from the inscription.

Next is an example of how to realize this process in a page with HTML and one of ASP.NET (ASPX)

HTML:

<! DOCTYPE HTML PUBLIC “- //W3C//DTD XHTML 1,0 Transitional//EN? http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd? >
<html xmlns: wl= http://apis.live.net/js/2010 ″ >
<head>
<title>Titulo of the Pagina</title>
<script src= http://js.live.net/4.0/loader.js? ></script>
</head>
<body>
<div>
<br/>
<wl: chat-frame event-name=? <Nombre of the Sitio>? client-id=? <Application ID>? >
</wl: chat-frame>
</div>
</body>
</html>

ASPX:

<%@ Page Language=? C#? AutoEventWireup=? true? CodeBehind=? Chat.aspx.cs? Inherits=? NFN.Chat? %>

<! DOCTYPE HTML PUBLIC “- //W3C//DTD XHTML 1,0 Transitional//EN? http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd? >

<html xmlns: wl= http://apis.live.net/js/2010 ″ >
<head id=? Head1 ″ runat=? server? >
<title>Titulo of the Pagina</title>
<script src= http://js.live.net/4.0/loader.js? ></script>
</head>
<body>
<form id=? form1 ″ runat=? server? >
<div>
<wl: chat-frame event-name=? <Nombre of the Sitio>? client-id=? <Application ID>? >
</wl: chat-frame>
</div>
</form>
</body>
</html>

As the process can be seen is quite simple, as much for asp.net as with HTML the process he is identical =)

Home | Sitemap | Contact us | Copyright © 2010 www.windows2000advantage.com All rights reserved.