我想通过使用HWIOauthBundle访问oauth后由facebook发送的user_friends。HWIOauth&Facebook访问user_friends
##config.yml
resource_owners:
facebook:
type: facebook
client_id: %facebook_app_id%
client_secret: %facebook_app_secret%
scope: "email, public_profile, user_friends"
infos_url: "https://graph.facebook.com/me?fields=id,name,email,picture.type(square)"
paths:
email: email
profilepicture: picture.data.url
在loadUserByOAuthUserResponse(UserResponseInterface $response)
我这样做记录的数据:
$attr = $response->getResponse();
$this->logger->info(print_r($attr,true));
,我得到的输出数组的信息:
Array
(
[id] => 1015539##########
[name] => john smith
[email] => [email protected]
[picture] => Array
(
[data] => Array
(
[is_silhouette] =>
[url] => https://fbcdn-profile-a.akamaihd.net/hprofile-ak-xaf1/v/t1.0-1/p50x50/10998###_1015530##########_207119375##########_n.jpg?oh=1f0e94af68daa############f888611&oe=5#######&__gda__=1###720385_a2c0bb15f160abf4############3289
)
)
)
(# ###和为隐私添加的假名称)
如何访问user_friends?
我相信它正在开发Facebook的结束,因为它会要求得到允许在登录时。
现在你只能得到同样使用相同应用程序的用户的朋友。 – zerkms 2015-03-31 06:52:17
是的,我知道。我仍然喜欢这个数据。有多个用户共享应用程序 – Chris 2015-03-31 12:49:39