I am trying to implement facebook SSO on my Android app. Once the user logs into the app using facebook he will make calls to my web service running on Google App Engine(GAE). Currently I am able to obtain the access_token from facebook on my android app. Then I add this access_token as a cookie to my http request to GAE . But I am not sure how would I authenticate the request from the user using the cookie, on GAE. Currently I am trying:-
User user = OAuthServiceFactory.getOAuthService().getCurrentUser();
String email = user.getEmail();
But my GAE web service is throwing this exception:-
org.restlet.resource.UniformResource doCatch: Exception or error caught in resource
com.google.appengine.api.oauth.InvalidOAuthParametersException
Is this the correct way of authenticating the user? If yes, then what am I missing here which is causing this exception.
Thank for the help!!