FaceBook Login with API REST

0

I've integrated an Android app with FaceBook and I'm already able to log in there.

Now, I have to integrate the FaceBook login with the authentication part of my API. For example, now, what I can do is log in through FB and if everything is ok, I'll send it to another activity. But to start consuming API resources, I need the token that is generated by it.

Does anyone know of any way to do this?

    
asked by anonymous 11.11.2016 / 18:08

1 answer

0

After the login response via Facebook.

You can check if the session is actually open, and grab the user's token

Example:

Session session = Session.getActiveSession();
if (session.isOpened()) {
    Log.d("token", session.getAccessToken());
}
    
11.11.2016 / 18:13