问题
I am working with Google Contact API v3. The goal is to synchronize contacts between my DB and a Google Account. My problem is :
1) when I search contact by email address without a contact group, I get one good result
Here is the query :
https://www.google.com/m8/feeds/contacts/default/full?q=myemail%40hotmail.fr&max-results=1&v=3.0&access_token=XXXXXXXXX
2) when I do the same search within a contact group, I get all contacts list
Here is the query :
https://www.google.com/m8/feeds/contacts/default/full?q=myemail%40hotmail.fr&group=http://www.google.com/m8/feeds/groups/factorycrm%40gmail.com/base/64e5e3218c7572e4&max-results=1&v=3.0&access_token=XXXXXXXXXXX
This is a real problem because second query messes all contacts in Google account.
My question is : how to search a contact by its email address within a google contact group ?
Thanx
回答1:
I was also cracking my brains with this one. Seems that Google drops the q
parameter when the group
one is provided. To resolve this, I've started keeping the Google contact ID and queried it directly instead of via the Group.
So basically you're stuck with fetching the contact directly, and then checking its group.https://www.google.com/m8/feeds/contacts/default/full/{contact-id}
来源:https://stackoverflow.com/questions/24824862/google-contact-api-v3-q-parameter-is-ignored-if-search-in-a-contact-group