I have created and running an app on Google App Engine. The app has several users who log in as themself but need to use a common set of CONTACTS. ie on just one user.
When retrieving contacts how do I set the USER NAME for the set of contacts to be retrieved.
At present it always looks at the list of contacts of the user who is logged in.
I am using:
gd_client = gdata.contacts.service.ContactsService()
gdata.alt.appengine.run_on_appengine(gd_client)
query = gdata.contacts.service.ContactsQuery()
query.max_results = 10000
feed=gd_client.GetContactsFeed(query.ToUri())
for i, entry in enumerate(feed.entry):
I have the tokens stored for all users
It doesn’t work that way, the user needs to grant access to your application to view the contacts in a process called OAuth2.
There is good tutorial on this here