Facebook Template with existing Token
I am trying to develop an Android application. It requires Facebook auth to be used. I am using Spring as a backend. I am having problems using Spring Social having already a token.
I authenticate in the Android device and send the auth token to the backend. Then do this in the controller:
Code:
Facebook facebook = new FacebookTemplate(authToken);
String facebookId = facebook.userOperations().getUserProfile().getId();
I am getting the error:
org.springframework.social.MissingAuthorizationExc eption: Authorization is required for the operation, but the API binding was created without authorization.
I think Spring is doing this GET call:
https://graph.facebook.com/me
when it should do something like:
https://graph.facebook.com/me?access_token=ACCESS_TOKEN
I have tried this with a valid token and nothing. Am I doing something wrong?