0

我正在使用 Google Data API 从 gmail 中检索联系人。我使用了以下代码:

string token = Request.QueryString["token"];
            RequestSettings rs = new RequestSettings("myapp", token);
            rs.AutoPaging = true;
            List<string> lstEmails = new List<string>();
            try
            {
            rs.AutoPaging = true;
            ContactsRequest cr = new ContactsRequest(rs);
            Feed<Contact> f = cr.GetContacts();
            foreach (Contact e in f.Entries)
            {
                foreach (EMail email in e.Emails)
                {
                    lstEmails.Add(email.Address);
                }
            }
            }
            catch
            {

            }

但它仅读取 25 个 gmail 联系人,并引发以下错误:

Execution Failed: {https://www.google.com/m8/feeds/contacts/{email}/full?start-index=26&max-results=25}

但我想从 gmail 获得总联系人。

4

0 回答 0