I've been working on a website that allows for users to register with their Facebook accounts, using their FB emails to register. Upon registration, their email and Facebook ID are stored in my database. Users could also register with our form with an email and password. Users have the ability to change their email addresses, but this posed as a problem for Facebook login, since if a FB user changed their email on their account on my website, their facebook would no longer be connected to their account.
I solved this by making Facebook Login use the Facebook ID instead of the email of the user, so Facebook-registered users would be able to change their emails. However, when I made this change, some of the facebook ID's no longer worked. Some users who tried logging in with facebook were met with an error telling them that their email was already in use, meaning that the ID of the facebook account and the ID in my database didn't match, so my website's response was to try registering the user.
Does facebook change the ID or ID format from time to time? I checked the database versus the ID facebook was giving me and they were completely different.