Click to Rate and Give Feedback
Collapse All/Expand All Collapse All
Windows Live Messenger Web Toolkit Class Reference
User Class

Represents the currently signed-in Windows Live Messenger user.

Script:  http://www.wlmessenger.net/api/3.7/loader.js
Feature:  Messenger.Core
Namespace:  Microsoft.Live.Messenger
 
Cc299077.alert_note(en-us,MSDN.10).gifNote

The Windows Live Messenger Web Toolkit is built using the ASP.NET Ajax Library. ASP.NET Ajax exposes a type system that enables you to add object-oriented capabilities to your JavaScript code. To learn more about creating, instantiating and deriving from classes, visit Creating Custom Client Script by Using the ASP.NET Ajax Library.

JavaScript
Microsoft.Live.Messenger.User = function();

Type.registerClass(
    'Microsoft.Live.Messenger.User',
    null,
    Microsoft.Live.Messenger.INotifyPropertyChanged,
    Sys.IDisposable);
C# (Script#)
public class User : INotifyPropertyChanged, IDisposable
You can create an instance of the User object using the Identity property returned by the Sign-in Control. Use the User object to manage all messaging activity (such as conversations, online presence, contacts, and groups). The User object exists only for the life of the hosting Web page. A single instance can be accessed after a user is signed in. The User object goes away when the user navigates away from the page, refreshes the page, or closes the browser.
The following example demonstrates creating an instance of the User object, creating the delegate for the signInCompleted event, and then calling the signIn method to sign the user in. The authenticationCompleted function is called when the user authentication process is complete.
JavaScript
            var _user = null;
            
            function authenticationCompleted(sender, e) {
                _user = new Microsoft.Live.Messenger.User(e.get_identity());
                _user.add_signInCompleted(signInCompleted);
                _user.signIn();
            }
            
Object
  Microsoft.Live.Messenger..::.User

Windows Live Messenger Web Toolkit


Internet Explorer 8.0, Internet Explorer 7.0, Internet Explorer 6.0, Firefox 3.5, Firefox 3.0, Firefox 2.0, Firefox 1.5, Chrome 3.0, Chrome 2.0, Chrome 1.0, Safari 4.0, Safari 3.0

© 2010 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker