Google Oauth 城市问题
Google Oauth city issue
当我尝试使用 curl 执行此请求时
https://www.googleapis.com/oauth2/v1/userinfo?access_token=$access_token
范围
我收到下一个
{ ["id"]=> string(21) "someid"
["name"]=> string(16) "name"
["given_name"]=> string(9) "given_name"
["family_name"]=> string(6) "family_name"
["link"]=> string(45) "profile url"
["picture"]=> string(92) "picture link"
["gender"]=> string(4) "male"
}
我必须接收当前位置并放置住。我找到了这个
https://developers.google.com/+/api/latest/people/get 当我使用此表格(它显示我的城市)时,它说我请求 GET https://www.googleapis.com/plus/v1/people/108293047925229351365?key={YOUR_API_KEY}
。我试过了,但总是出错。有什么问题?
People: get returns a person resource 据我所知,人员资源中没有当前位置。如果您使用底部的试用部分对其进行测试,您还会注意到,除非相关人员将居住地设置为 public,否则他们将不会被退回。
如果您转到底部的 people.get,请尝试一下。 108293047925229351365 添加您将看到信息正在返回的用户 ID。
https://www.googleapis.com/plus/v1/people/{UserID}?key={YOUR_API_KEY}
是我注意力不集中。抱歉,我忘记为我的应用启用 Google+ API。
当我尝试使用 curl 执行此请求时
https://www.googleapis.com/oauth2/v1/userinfo?access_token=$access_token
范围
我收到下一个
{ ["id"]=> string(21) "someid"
["name"]=> string(16) "name"
["given_name"]=> string(9) "given_name"
["family_name"]=> string(6) "family_name"
["link"]=> string(45) "profile url"
["picture"]=> string(92) "picture link"
["gender"]=> string(4) "male"
}
我必须接收当前位置并放置住。我找到了这个
https://developers.google.com/+/api/latest/people/get 当我使用此表格(它显示我的城市)时,它说我请求 GET https://www.googleapis.com/plus/v1/people/108293047925229351365?key={YOUR_API_KEY}
。我试过了,但总是出错。有什么问题?
People: get returns a person resource 据我所知,人员资源中没有当前位置。如果您使用底部的试用部分对其进行测试,您还会注意到,除非相关人员将居住地设置为 public,否则他们将不会被退回。
如果您转到底部的 people.get,请尝试一下。 108293047925229351365 添加您将看到信息正在返回的用户 ID。
https://www.googleapis.com/plus/v1/people/{UserID}?key={YOUR_API_KEY}
是我注意力不集中。抱歉,我忘记为我的应用启用 Google+ API。