how to integrate facebook login with your website?

后端 未结 6 2256
甜味超标
甜味超标 2020-12-23 10:09

I made some research and i can\'t seem to completely undestand how to integrate facebook login with your website.

I\'m trying to do this for an old fashioned php sho

6条回答
  •  北荒
    北荒 (楼主)
    2020-12-23 10:50

    This type of technology (called OpenConnect, if I'm not mistaken, and they are switching to OAuth) is somewhat the same with OpenID.

    Google, indeed, uses openID, and I am not really sure of how they work.

    For FacebookConnect, you register your app with facebook ( https://developers.facebook.com/apps ) and you will find details about auth https://developers.facebook.com/docs/authentication/ here.

    The idea is that you are going to get a authorization code that you send back to facebook and get an access_token which means your user is authed with your website. You can store this in a $_SESSION var I think... There is no need to store anything to DB, but in your particular setup you can use the userID as the unique user identifier.

提交回复
热议问题