findContact Method

findContact Method

Current information about Live Connect is now available in the Windows Live Developer Center. The information in the following sections is provided for legacy purposes only.

Returns the contact that has the specified ID.

Feature:  Microsoft.Live
Namespace:  Microsoft.Live

var contact = instance.findContact(cid);


Type: String

Specifies the ID of the contact to return.

Return Value

Returns the object of class Contact that corresponds to the specified ID, or null if the ID does not correspond to any Contact object.

The following example demonstrates how to notify the user that a contact has become busy.

//Get the messenger context and set the onContactPresenceChanged callback as the user signs in.
messengerContext = wl.App.get_messengerContext();
//If the contact's new presence value is busy, display an alert that notifies the user which contact is busy.
function onContactPresenceChanged(cid, name, value)
    if (value == Microsoft.Live.Messenger.PresenceStatus.busy)
        messengerContext = wl.App.get_messengerContext();
        var contact = messengerContext.findContact(cid);
        alert(contact.get_fullName() + " is busy.");

Windows Live Messenger Connect

Supported in: 4.1

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

© 2016 Microsoft