当同一个应用程序被用于使用Google进行身份验证时,获得好友列表(服务器端)的目的是什么?
使用Facebook图形API,可以获得好友列表:https://graph.facebook.com/v2.3/me/friends
我可以从GitKit得到访问令牌吗?
使用user_friends登录时不询问GitKit权限
当我试图让google+朋友使用相同的应用程序时,可能会出现类似的问题。
不使用任何社交“功能”的社交登录对我来说没有任何意义,我希望有一种方法可以通过Gitkit来实现这一点。
发布于 2015-06-23 22:52:36
若要向Android上的Identity Toolkit登录添加额外权限,请将identitytoolkit.extra_scopes元数据添加到清单中。它看起来应该是:
<meta-data
android:name="identitytoolkit.extra_scopes"
android:value="Google: g_scope1; Facebook: f_scope1 f_scope2; Yahoo: y_scope1"/>登录完成后,Facebook将使用适当的令牌进行初始化,因此您可以通过AccessToken.getCurrentAccessToken()检索访问令牌。因为Facebook令牌是便携,所以可以将从应用程序中检索到的标记发送到后端,并与图形API一起使用。
发布于 2015-06-25 11:12:16
对于Javascipt解决方案,我现在已经编辑了gitkit.js,以支持OAuth作用域,如Gitkit v2:https://github.com/Hollerweger/Gitkit-Javascipt-Enhancements中的
样本Config:
idpConfig: {
facebook: {
scopes: [
"public_profile",
"user_friends",
"email"
]
},
google: {
scopes: [
"https://www.googleapis.com/auth/userinfo.email+https://www.googleapis.com/auth/plus.login"
]
}
}不需要Google+作用域,因为它是默认的。只使用google+和facebook登录进行测试。
idpConfig儿童的名字必须在境内流离失所者身份验证网址的前45个字符中才能起作用。
https://stackoverflow.com/questions/31010839
复制相似问题