通过 user_id 问题获得 Google+ 头像 url
Get Google+ profile picture url by user_id issue
两年前发布了多人游戏,两周前集成了google+登录。 Google+ 登录在 Web 和 Android 两个平台上都能完美运行,但是在两个平台的在线玩家列表中显示个人资料图片时会出现问题。有些头像显示了,有些没有显示。
获取头像我用过:
https://www.googleapis.com/plus/v1/people/{user_id}?fields=image&key={browser_key or android_key}
如果请求失败,状态为 404。
{
"error": {
"errors": [
{
"domain": "global",
"reason": "notFound",
"message": "Not Found"
}
],
"code": 404,
"message": "Not Found"
}
}
Here you can find Google+ API report
欢迎任何comment/suggestion或提示。谢谢。
用户不再需要在 Google+ 上创建帐户。个人资料数据链接到 google+ 因此,如果您有一个未在 google+ 上创建帐户的用户登录,您将找不到任何数据。
GET https://www.googleapis.com/plus/v1/people/111102772937280436258
结果
{
"error": {
"errors": [
{
"domain": "global",
"reason": "notFound",
"message": "Not Found"
}
],
"code": 404,
"message": "Not Found"
}
}
Google+ 页面 link doesnt work. This one user 确实有一个 google+ 帐户,这就是它有效的原因。
建议让用户创建一个 google+ 帐户或让他们能够将自己的图片上传到您的系统。我认为您没有办法以编程方式更新 Google 上的用户个人资料图片。
两年前发布了多人游戏,两周前集成了google+登录。 Google+ 登录在 Web 和 Android 两个平台上都能完美运行,但是在两个平台的在线玩家列表中显示个人资料图片时会出现问题。有些头像显示了,有些没有显示。
获取头像我用过:
https://www.googleapis.com/plus/v1/people/{user_id}?fields=image&key={browser_key or android_key}
如果请求失败,状态为 404。
{
"error": {
"errors": [
{
"domain": "global",
"reason": "notFound",
"message": "Not Found"
}
],
"code": 404,
"message": "Not Found"
}
}
Here you can find Google+ API report
欢迎任何comment/suggestion或提示。谢谢。
用户不再需要在 Google+ 上创建帐户。个人资料数据链接到 google+ 因此,如果您有一个未在 google+ 上创建帐户的用户登录,您将找不到任何数据。
GET https://www.googleapis.com/plus/v1/people/111102772937280436258
结果
{
"error": {
"errors": [
{
"domain": "global",
"reason": "notFound",
"message": "Not Found"
}
],
"code": 404,
"message": "Not Found"
}
}
Google+ 页面 link doesnt work. This one user 确实有一个 google+ 帐户,这就是它有效的原因。
建议让用户创建一个 google+ 帐户或让他们能够将自己的图片上传到您的系统。我认为您没有办法以编程方式更新 Google 上的用户个人资料图片。