How can I authenticate to my applications webservice after using Facebook SSO on Android?

前端 未结 2 670
甜味超标
甜味超标 2020-12-12 20:03

I am creating an Android app that uses Facebook SSO to login and I\'m not sure how to authenticate with my own webservices after I login to FB. When a user first opens my a

2条回答
  •  半阙折子戏
    2020-12-12 20:27

    Facebook SSO returns an access token. If you'd like, you can pass that along to your server and your server can make a call to the Facebook APIs to check that it's a valid access token for that user (eg by calling https://graph.facebook.com/me?access_token=ACCESS_TOKEN) -- if it is, you're good and have verified that the user is who they say they are (or is a hacker with enough access to have a valid auth token for your app for Facebook, at which point their identity has been compromised on Facebook's end).

提交回复
热议问题