2013-01-13 38 views
0

取我有一個代碼獲取用戶細節
在位置區域 我已經在控制器類中使用此代碼Facebook的用戶位置通過SpringSocial

model.addAttribute("location",facebook.userOperations().getUserProfile().getLocation());

此錯誤顯示在JSP視圖中的位置框。

位置:[email protected]

生日:不顯示任何東西 但顯示性別:男 請help..why?

回答

0

位置是一個對象。我想你想顯示屬性的值:

facebook.userOperations().getUserProfile().getLocation().getName()   

您可能沒有足夠的權限來查看生日日期。你確定你已經申請user_birthday登陸/註冊表單訪問:

<form class="fb_signin" action="/signin/facebook" method="POST"> 
    <input type="hidden" name="scope" value="...,user_birthday,..." /> 
</form> 

查看所有可用權限here

相關問題