提取gmail,yahoomail和AOL联系人的c#库
是否有任何好的c#库提取gmail,yahoomail和AOL联系人? 任何建议……
我查看了Opencontacts.net ,我在我的asp.net Web应用程序中使用了opencontacts.dll,但我无法使其工作…它显示错误Could not load file or assembly 'Utilities, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
Could not load file or assembly 'Utilities, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
….
我这样做了,
OpenContactsNet.GmailExtract gm = new OpenContactsNet.GmailExtract(); NetworkCredential nw =new NetworkCredential("chendur.pandiya@gmail.com","***"); OpenContactsNet.MailContactList ml = new OpenContactsNet.MailContactList(); gm.Extract(nw, out ml);
我正在寻找能够满足我需求的任何其他c#库….
我没有看到一个适合所有人的好人。 单独使用各个服务相当容易,因为所有这些服务都有.net示例。 我可能会以任何方式单独使用它们,然后如果可能的话可能会提取一个通用接口,以便可以根据需要添加其他流行的webmail服务。
雅虎: http : //developer.yahoo.com/addressbook/
Gmail: http : //code.google.com/apis/contacts/docs/1.0/developers_guide_dotnet.html
AOL: http : //dev.aol.com/article/2007/integrating_openauth_into_aspnet
Hotmail: http : //msdn.microsoft.com/en-us/library/bb463989.aspx
RequestSettings rs = new RequestSettings(this.ApplicationName, this.userName, this.passWord); // AutoPaging results in automatic paging in order to retrieve all contacts rs.AutoPaging = true; ContactsRequest cr = new ContactsRequest(rs); Feed f = cr.GetContacts(); foreach (Contact e in f.Entries) { Console.WriteLine("\t" + e.Title); foreach (EMail email in e.Emails) { Console.WriteLine("\t" + email.Address); } foreach (GroupMembership g in e.GroupMembership) { Console.WriteLine("\t" + g.HRef); } foreach (IMAddress im in e.IMs) { Console.WriteLine("\t" + im.Address); } }
你应该使用System.Net添加;
`using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; /*CREDENTIAL CLASS' NAMESPACE*/ using System.Net; using OpenContactsNet; namespace WebApplication1 { public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { OpenContactsNet.GmailExtract gm = new OpenContactsNet.GmailExtract(); NetworkCredential nw = new NetworkCredential("tresorunikin@gmail.com", "titinik"); OpenContactsNet.MailContactList ml = new OpenContactsNet.MailContactList(); gm.Extract(nw, out ml); //Triyng to Show somethin Response.Write(ml.Count+" Contacts : "); foreach(MailContact mc in ml){ Response.Write(mc.Email+"
"); } } } }`
这是针对.Net开发人员的Gmail联系人导入2.0的新链接
缺少的“Utilities”程序集位于OpenContactsNet项目下载(OpenContactsNet \ Lib \ Utilites.dll)下的\ Lib文件夹中。
但是,我认为它不再适用。 这个库已经过时了。