我試圖用org.springframework.boot:spring-boot-starter-social-facebook
來實現我的春季webapp的Facebook登錄,但是每次我跟隨Facebook的主機登錄流程我得到這個頁面:春天社會Facebook登錄 - 對不起,出錯了
這裏是我的設置:
- 新增的appid和祕密:
個application.properties
spring.social.facebook.appId=xxx
spring.social.facebook.appSecret=xxx
在Facebook開發人員頁我啓用Facebook登錄產品,並添加
http://localhost:8080/connect/facebook
我的重定向URI。寫了登錄表單:
連接/ facebook.html
<form th:action="@{/connect/facebook}" method="POST">
<input type="hidden" name="scope" value="user_posts"/>
<button type="submit">Connect to Facebook</button>
</form>
重定向我到這個網址: https://www.facebook.com/v2.3/dialog/oauth?client_id=xxx&response_type=code&_csrf=732c940f-37fc-406b-b08b-d591e0e372a3&redirect_uri=http%3A%2F%2Flocalhost%3A8080%2Fconnect%2Ffacebook&scope=user_posts&state=8ec3aaa3-972e-401e-b47f-930f654f6fd8
我認爲_csrf
不這裏需要來自Spring的csrf進樣器,但它不應該'無論如何不會有任何分別。
有誰知道如何解決這個問題?錯誤消息根本不是詳細的,我不知道我可以從哪裏開始排除故障。
看起來好像有一個失敗的臉書,文字寫在對不起,somethink ......聽起來有一個臨時的問題,在那裏的網站。如果您按照此處所述驗證您的Facebook開發者帳戶,該怎麼辦: https://github.com/spring-guides/gs-register-facebook-app? –
在Facebook上重新創建應用程序 –