And So I am developing a website that essentially enables user to register utilizing their facebook account/facebook connect and merely a conventional register (username, password). Now presently my table appears like this:

uid, username, password, email

I believed of how do i change this table structure to include the facebook account connect because it does not have username or password inside it, must i just keep email and then leave the account information blank? How can other sites which have such login structure save these details?

You'll actually want to keep facebook_id too, that I suggest utilizing a bigint.

You could also wish to give a status column that signifies whether this user account was produced via current email address or facebook_id, to ensure that at login time you realize which to check on. Alternately, you can just check the one which you've qualifications for.

This can be a fairly open ended question, and also the solutions rely on what your attempting to accomplish, and also the use cases you are attempting to address. Some general ideas/suggestions: It's also wise to keep Facebook ID like a separate column. You are able to leave the username blank, because the Facebook ID can distinctively identify the consumer, or make use of the email because the username. If you are using only Facebook connect, you do not need the password since make use of the JS SDK to make certain the consumer includes a valid Facebook login session.