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_id
values as strings (can't find the reference anywhere now). The documentation also says that the user_id
value is a string.
In my experience, the user_id
can be a bigint(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 actual user_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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With