none
LiveConnectClient retrieve contact's picture

    Dotaz

  • I would like to download list of contacts associated with live account and download their pictures. Is there any way how to do that?

    LiveAuthClient auth = new LiveAuthClient();
    LiveLoginResult loginResult = await auth.LoginAsync("wl.basic,wl.emails,wl.photos,wl.birthday,wl.messenger".Split(','));
    if (loginResult.Status == LiveConnectSessionStatus.Connected)
    {
        LiveConnectClient liveClient = new LiveConnectClient(loginResult.Session);
        contactsResult = await liveClient.GetAsync("me/contacts");
    
        //...
    
        foreach (var contactInfo in contactsInfos)
        {
            // Id looks like this: "contact.b9b5c9e5000000000000000000000000"
            string contactId = contactInfo.id;
            contactsResult = await liveClient.GetAsync(contactId);
            // Result DOES NOT contain url of the image of the contact.
    
            // TODO: Download image of the contact.
        }
    }

    18. června 2013 12:35