我想使用OpenID(PHP和LightOpenID)来获取以下用户信息:
$openid->required = array(
'namePerson',
'namePerson/first',
'namePerson/last',
'contact/email',
'person/guid',
'birthDate/birthYear',
'birthDate/birthMonth',
'birthDate/birthday',
'gender',
);
但是,我发现Yahoo和Google都只返回以下数据:
Array ( [namePerson] => abc [contact/email] => abc@example.com )
我的代码有问题吗?我可以强制Google和Yahoo返回我想要的所有数据吗?
答案 0 :(得分:2)
Google和Yahoo OpenID实施都尊重属性交换中的“必需”,但不是您要查找的所有属性。以下是各自的文档,列出了其架构支持的属性。
https://developers.google.com/accounts/docs/OpenID#Parameters
在发布时,这些是当前支持的字段 对于谷歌
http://developer.yahoo.com/blogs/ydn/yahoo-openid-now-attribute-exchange-7795.html
在发布时,这些是当前支持的字段 对于雅虎