Is there a maximum value to the id of a facebook user ?
I was using an SQL integer to store the value but it’s not enough as I’ve encountered an id with 15 digits.
I’m guessing there is none (would be logical…) and that the equivalent of a big integer is being used ? So should I just switch to varchar(255) ?
Facebook once recommended that you store your
user_idvalues as strings (can’t find the reference anywhere now). The documentation also says that theuser_idvalue is a string.In my experience, the
user_idcan be abigint(20)value but I think it’s a good idea to store it as a string to try prevent any possible future changes from messing with my applications. In any case, no numerical operations are really needed on the actualuser_id; It’s just a unique identifier. Make sure you use it as an index in your database’s users table so that there will be no chance of duplicate user_ids.