我正在构建一个 C# 应用程序,我希望收集用户联系人列表(电子邮件、名字、姓氏)。使用直接登录,我能够提取除电子邮件之外的所有联系人信息。有没有办法让我检索所有联系人及其各自的电子邮件?
public void GetContacts(iCloudContactSortOrder sortOrder = iCloudContactSortOrder.FirstName)
{
if (!IsConnected)
throw notConnectedException;
// Set sort order
ContactsSortOrder = sortOrder;
// Create client
NetClient netClient = new NetClient(sessionCookies, ICLOUD_HOME_URL, ICLOUD_HOME_URL);
// Post client context data to the servers.
string strResult = netClient.GET(ContactsMeCardUrl);
ContactsMeCard = Deserialize<iCloudContactsMeCard>(strResult);
// get contacts list.
strResult = netClient.GET(ContactsStartupUrl);
lastContactsResponse = Deserialize<iCloudContactsContactsResponse>(strResult);
}