通过SpringSocial获取facebook用户位置
我有一个获取用户详细信息的代码通过SpringSocial获取facebook用户位置,spring,spring-mvc,spring-security,spring-social,Spring,Spring Mvc,Spring Security,Spring Social,我有一个获取用户详细信息的代码 位置区域内 我在控制器类中使用了这段代码 model.addAttribute(“location”,facebook.userOperations().getUserProfile().getLocation()) 此错误显示在位置框的jsp视图中 地点:org.springframework.social.facebook.api。Reference@97d487 生日:没有任何东西 但显示性别:男性 请帮助..为什么???位置是一个对象。我认为您希望显示na
位置区域内 我在控制器类中使用了这段代码
model.addAttribute(“location”,facebook.userOperations().getUserProfile().getLocation())代码>
此错误显示在位置框的jsp视图中
地点:org.springframework.social.facebook.api。Reference@97d487
生日:没有任何东西
但显示性别:男性
请帮助..为什么???位置是一个对象。我认为您希望显示name属性的值:
facebook.userOperations().getUserProfile().getLocation().getName()
您可能没有足够的权限查看生日日期。您确定您已经在登录/注册表单中请求了用户访问权限吗
<form class="fb_signin" action="/signin/facebook" method="POST">
<input type="hidden" name="scope" value="...,user_birthday,..." />
</form>
查看所有可用权限