【问题标题】:Programatically adding "New Custom Field" To Google Contacts using Google contact API使用 Google 联系人 API 以编程方式将“新自定义字段”添加到 Google 联系人
【发布时间】:2010-03-25 11:47:13
【问题描述】:

如何使用 Google Contact API (c#) 在 Google Contact 中创建新的“自定义字段”?

我用过:

ExtendedProperty obj_ExtendedProperty = new ExtendedProperty(); 
 obj_ExtendedProperty.Name             = "Department";
 obj_ExtendedProperty.Value            = "Sales";
 ContactEntry.ExtendedProperties.Add(obj_ExtendedProperty);

感谢

【问题讨论】:

  • 我做了更改。希望现在你有问题了
  • 看起来您直接复制并粘贴了客户的要求。这个问题还不清楚

标签: c# api gmail contact


【解决方案1】:

查看ContactEntry 课程以及如何使用update it

检索您的联系人:

RequestSettings rs = new RequestSettings(this.ApplicationName, this.userName,this.passWord);      
ContactsRequest cr = new ContactsRequest(rs);  
Contact contact = cr.Retrieve<Contact>("http://www.google.com/m8/feeds/contacts/test@gmail.com/full/12345");

更新您的联系人:

UserDefinedField customField= new UserDefinedField("yourFieldName","yourFieldValue);  
contact.addUserDefinedField(customField);  
Contact updatedContact = cr.Update(contact);

【讨论】:

猜你喜欢
  • 1970-01-01
  • 2016-09-05
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多