我正在尝试使用 google plus 授权我的应用程序。但是,当我使用人员服务并尝试获取“我”时,我尝试的所有操作总是给我一个 404,除非我使用创建 Google+ API 应用程序的用户登录。这对我来说没有任何意义,为什么会这样。
from httplib2 import Http
from apiclient.discovery import build
credential = gp_client.step2_exchange(request.REQUEST)
http = Http()
http = credential.authorize(http)
service = build("plus", "v1", http=http)
o = service.people().get(userId='me').execute()
当我使用 Google+ 资源管理器时也是如此:
http://code.google.com/apis/explorer/#_s=plus&_v=v1&_m=people.get&fields=emails
如果我与创建 API 的用户切换到私有,那么我可以获取“我”,但如果我授权另一个用户,那么我无法获取“我”。
任何想法发生了什么?