使用Google Contacts API创建联系人3

I am having problems creating a contact entry using Google Contacts API. I am using PHP to do this. My problem is, I can create an entry in the users contacts, but there is no name set. The only field to be set is the email address. For example this is the XML I send:

<?xml version="1.0"?>
<atom:entry xmlns:atom="http://www.w3.org/2005/Atom" xmlns:gd="http://schemas.google.com/g/2005">
  <gd:name>
    <gd:givenName>John</gd:givenName>
    <gd:familyName>Smith</gd:familyName>
    <gd:fullName>John Smith</gd:fullName>
  </gd:name>
  <gd:email address="john@smith.com" rel="http://schemas.google.com/g/2005#home"/>
</atom:entry>

And this is what is returned:

<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://www.w3.org/2005/Atom" xmlns:batch="http://schemas.google.com/gdata/batch" xmlns:gContact="http://schemas.google.com/contact/2008" xmlns:gd="http://schemas.google.com/g/2005">
<id>http://www.google.com/m8/feeds/contacts/user@domain/base/xyz123</id>
<updated>2015-05-13T08:30:56.531Z</updated>
<category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
<title type="text"/>
<link rel="http://schemas.google.com/contacts/2008/rel#edit-photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/user@domain/xyz123/abc987"/>
<link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/user@domain/xyz123"/>
<link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/user@domain/xyz123/1431505856531001"/>
<gd:email rel="http://schemas.google.com/g/2005#home" address="john@smith.com"/>
</entry>

Note that "title" is empty when returned:

<title type="text"/>

What am I missing?

Edit

To sum up - I can create a contact entry. I set givenName, familyName, fullName and email in the XML I post, as shown in the first code block. A contact is successfully created, but only the email is saved. GivenName, FamilyName and FullName are not set. The desired behaviour would be for a contact to be created that contains givenName, familyName, fullName and email.

Solved

To set title you have to add the xml element:

<atom:title>John Smith</atom:title>

I wrongly assumed setting the givenName and familyName and fullName would set title. So my original XML Request would look like this:

<?xml version="1.0"?>
<atom:entry xmlns:atom="http://www.w3.org/2005/Atom" xmlns:gd="http://schemas.google.com/g/2005">
  <atom:title>John Smith</atom:title>
  <gd:name>
    <gd:givenName>John</gd:givenName>
    <gd:familyName>Smith</gd:familyName>
    <gd:fullName>John Smith</gd:fullName>
  </gd:name>
  <gd:email address="john@smith.com" rel="http://schemas.google.com/g/2005#home"/>
</atom:entry>