开发者

Adding Gmail Contacts Via API Response is O O

I am trying to SEND to gmail a contact record via XML as suggested via there documentation. I have this XML

<?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:firstName>John</gd:firstName>
    <gd:additionalName></gd:additionalName>
    <gd:givenName>Doe</gd:givenName>
  </gd:name>
  &开发者_如何学Pythonlt;gd:email address="john@doe.com" rel="http://schemas.google.com/g/2005#work"/>
  <gd:email address="john2@doe.com" rel="http://schemas.google.com/g/2005#home"/>

  <gd:organization rel="http://schemas.google.com/g/2005#work">
    <gd:orgName>John Deere</gd:orgName>
    <gd:orgTitle>Owner</gd:orgTitle>
  </gd:organization>
</atom:entry>

And I receive a "successfully added response (201)". But when I look in Gmail Contacts using the ID it responds to me, the contact looks like this.

Adding Gmail Contacts Via API Response is O O

I have no idea why it is responding like this... any thoughts?


I resolved my own issue, there was an issue with the Array() of data that I was passing, NOT with the XML.

Although you can't have EMPTY items, such as my 'additionalName'... it must contain at least 1-Space, ' '.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜