Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/spring-mvc/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
通过SpringSocial获取facebook用户位置_Spring_Spring Mvc_Spring Security_Spring Social - Fatal编程技术网

通过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>

查看所有可用权限