问题
We have a separate app, a completely stand alone site. We use facebook for simplified login.
We do the following right now
- show fb login
- authenticate user with fb javascript
- create our own account in our db and link it with their fb id.
all that works great. But now the user goes to a new computer, he first visits fb and logs in. He then goes to our site. Since we are pre-approved before we want to automatically log the user in with our own account.
So, simple question, how can i serverside (not javascript) check if the user is authenticated logged in with fb and also approved our app. I have the users fbID
回答1:
Common way to check user authentication is to use Javascript SDK, its FB.init function. This function makes request to http://www.facebook.com/extern/login_status.php which return authentication info. I think, you can do this request serverside.
来源:https://stackoverflow.com/questions/4760406/authenticate-user-serverside-from-stand-alone-application