1
我想開發一個Android應用程序。它需要使用Facebook身份驗證。我使用Spring作爲後端。有一個叫做Spring Social的很好的Spring擴展,但我很難按照我想要的方式使用它。春天的Facebook模板
我在Android設備上進行身份驗證並將其發送到我的後端。然後做這個控制器:
Facebook facebook = new FacebookTemplate(authToken);
String facebookId = facebook.userOperations().getUserProfile().getId();
我收到錯誤:
org.springframework.social.MissingAuthorizationException: Authorization is required for the operation, but the API binding was created without authorization.
我覺得春天是這樣做的GET調用:
當它應該做的事如:
https://graph.facebook.com/me?access_token=ACCESS_TOKEN
我已經嘗試過使用有效的令牌並沒有任何內容。難道我做錯了什麼?