从gmail获取联系人

时间:2012-06-01 18:09:15

标签: asp.net gmail

我正在使用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获得全部联系人。

0 个答案:

没有答案