No email data in Contact API V3?

2532 views
Skip to first unread message

Baptiste Lafontaine

unread,
Mar 27, 2012, 11:55:42 AM3/27/12
to google-co...@googlegroups.com
Hi,

I'm trying to use Google Contacts API to get the list of Emails my users (if they want to) in order to get their friends that already have subsribed to the website. 

I'm using the google api for php. The request I am doing is :

In the XML file resulting, I don't have any emails. Should I do another request on https://google.com/m8/feeds/contacts/default/<contact ID>/full all results in order to get the emails ?

Thanks.

Baptiste Lafontaine

unread,
Mar 27, 2012, 12:11:23 PM3/27/12
to google-co...@googlegroups.com
Nevermind. It was a bug of the example file given.

Tcyr

unread,
May 8, 2012, 5:33:22 AM5/8/12
to google-co...@googlegroups.com
Did you finally get the email? please can you explain?

Asep Nugraha

unread,
Jul 13, 2012, 5:31:45 AM7/13/12
to google-co...@googlegroups.com
hi, can you tell me tell me how you get the email ?
i have same traouble like you have.

please share here ^_^
thanks

Baptiste Lafontaine

unread,
Jul 13, 2012, 5:35:39 AM7/13/12
to google-co...@googlegroups.com
Sorry for the delay,

here is the code I'm using now :  http://pastebin.com/kAYT5Jng 

Asep Nugraha

unread,
Jul 13, 2012, 6:04:35 AM7/13/12
to google-co...@googlegroups.com
hi ,

thank you for share, i can try now :)

regards

Asep Nugraha

unread,
Jul 13, 2012, 6:12:41 AM7/13/12
to google-co...@googlegroups.com
hi,

i get the friend email now, thanks.
but i not see first name, last name or title ?
do you know, why?

thanks you very much for share ^_^

Asep Nugraha

unread,
Jul 13, 2012, 11:53:07 AM7/13/12
to google-co...@googlegroups.com
got it :)

thanks again..... ^_^

Warren Vail

unread,
Oct 19, 2012, 7:54:42 PM10/19/12
to google-co...@googlegroups.com
I've had some success with this, The url you show below should provide both name and emails but you need to take care of a couple of things;
  • if you are parsing using simpleXMLLoad, it will mask the gd:mail tag because, I suspect, it considers tags with colon's in the name as malformed and discards them.  Solution is to code your own xml parser using xml_parse, creating your own start tag, end tag and middle CData routines, not real tough.  This will allow you to see the gd:email tag and that the address attribute of the tag contains the actual email address.
  • you need to make sure you are informing the server which version of the API you are using by adding the following to the end of the URL you use for your request "&v=3.0".  This is a nice adaptation in that it means when version 4 comes our the API can continue to be compatible with your code by supplying data acording to the V3.0 specs.  I believe V3 is the first version to support the gd:fullname; gd:givenname and gd:familyname data.
Good luck,
 
Warren

Jacopo Galli

unread,
Oct 22, 2012, 5:12:56 AM10/22/12
to google-co...@googlegroups.com
Hi,
how can you got names and last names, starting from the code posted by Baptiste?
Thanks
Reply all
Reply to author
Forward
0 new messages