views:

286

answers:

1

Hi there,

I want to create a Facebook app that can operates inside IFrame / FB connect. I have to store some user information inside my database, but I still can't decide whether to use Facebook UID as the primary key or to create my own user ID (and have the Facebook UID as a regular column). Which approach is commonly used and why?

Thanks ! Andree

+1  A: 

The Facebook UID are also unique, as far as I am concerned, i always use the Facebook UIDs. Although that shouldn't a problem if you create your own ID but that would be an extra overhead.

Sarfraz
Yeah, I guess so. How do you store the Facebook UID in the database, by the way? Does it makes any difference if I store it as BIGINT (MySQL) instead of string, performance wise?
Andree
@Andree: Yes we use bigint, facebook ids are numbers and that is reasonable choice, also better as far as performance is concerned.
Sarfraz
Okay.. Thanks !
Andree

related questions