0

Google Contacts API v3 を使用していますが、連絡先の性別情報を更新できません

public static Contact UpdateContactName(ContactsRequest cr, Uri contactURL) 
{ 
  // First, retrieve the contact to update. 
  Contact contact = cr.Retrieve<Contact>(contactURL); 
  contact.Name.FullName = "New Name"; 
  contact.Name.GivenName = "New"; 
  contact.Name.FamilyName = "Name"; 
  contact.ContactEntry.AddExtension(new Gender("male"));
  try 
  { 
    Contact updatedContact = cr.Update(contact); 
    Console.WriteLine("Updated: " + updatedEntry.Updated.ToString()) 
    return updatedContact; 
  } 
  catch (GDataVersionConflictException e) 
  { 
    // Etags mismatch: handle the exception. 
  } 
  return null; 
} 
4

0 に答える 0