【问题标题】:Google+ API scope for education用于教育的 Google+ API 范围
【发布时间】:2013-07-26 18:59:32
【问题描述】:
在我的网站上,我想为我的用户提供使用 Google OAuth2 登录的选项。因为我的 webapp 需要知道我的用户正在访问哪个教育机构,所以我想使用他们的 google+ 个人资料为他们填写。 https://www.googleapis.com/auth/plus.me 范围为我提供了很多信息,但没有提供教育细节(或者我无法使用此范围找到它)。 Facebook GRAPH 使用 user_education_history,在使用 facebook 登录流程时效果很好。有人知道这是否可行以及如何使用 google+?
【问题讨论】:
标签:
google-api
google-plus
google-oauth
【解决方案1】:
这完全取决于用户在其个人资料中公开了哪些信息,因为目前只能通过 API 检索公开信息。
在people.get 方法的结果中,教育信息将包含在organizations 数组中,可通过"type": "school" 识别(而不是同一数组中的"type": "work" 条目)。
看看这个example of my own profile:
"organizations": [
{
"name": "TU Wien",
"title": "Computer Science",
"type": "school",
"startDate": "1998",
"endDate": "2004",
"primary": false
},
...
]