I have a question regarding login through Facebook.
I have a database with a users table and I have a normal registration and login system, but I wanted to implement the login system through Facebook.
How do I tell the system when to register or log in? For example, I enter with Facebook the first time and the site has to create a space in the database for me but the second time it should access my already registered data, how do I do this?