Authenticate user serverside from stand alone application
We have a separate app, a completely stand alone site. We use faceboo开发者_开发百科k 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
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.
精彩评论