When my app starts I get the user’s facebook id. This works fine for some people, but when other people get on I get weird id’s. In particular the id starts with 10000. I can’t figure out why I’m getting this kind of id for some people and not for others.
Would this be caused by a mistake in how I’m getting the id?
When my app starts I get the user’s facebook id. This works fine for
Share
Facebook has a lot of users. They can assign user id’s in 64bit numbers. That is what you are seeing with those “different” ids. In order to allow everyone to be able to use these 64bit numbers even if they don’t have a 64bit system, Facebook returns these values as strings.
You need to store your
user_idvalues as strings. This will prevent numbers getting too big to hold asintvalues. In my experience, the best thing to do is store your user id values asvarchar– this will also minimize problems with possible changes in the future.We don’t actually perform any mathematical operations on user_id values, so there is no need to store it as a number.