Miguel K.
Miguel K.

Reputation: 113

Database Design for Facebook Connect Website?

I'm creating a database for a site that uses Facebook connect for user login/profiles.

I usually have a unique key (auto-increment) for all users. Is this still a good idea, even if every record (user) is going to have a unique Facebook id that I can use?

Why?

Upvotes: 1

Views: 1013

Answers (2)

No. It's usually not a good idea even if you're not using Facebook Connect. But since Facebook Connect offers a stable, simple, unique identifier, you should use it. They're doing all the hard work--stand on their shoulders.

Upvotes: 1

mpj
mpj

Reputation: 5367

If you are going for a single FB id login, then you are fine with they uid that they provide. If you are planning (not necessarily now) to have your own users and also allow a login through FB Connect, then I recommend you to use two tables.

You can always match a FB user and your own users with the email that they provide you into your site and the email that they use for FB.

Upvotes: 1

Related Questions