Programatically adding “New Custom Field” To Google Contacts using Google contact API

淺唱寂寞╮ 提交于 2019-12-04 14:44:13

Have a look to ContactEntry class and how to update it.

RETRIEVE your contact:

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");

UPDATE your contact:

UserDefinedField customField= new UserDefinedField("yourFieldName","yourFieldValue);  
contact.addUserDefinedField(customField);  
Contact updatedContact = cr.Update(contact);
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!