We use the Facebook API to handle user's log in into our site and works fine, but some users are having problems when trying to login. After some research we found out that the user ID stored in our DB doesn't match the ID retrieved by:
$user_profile = $facebook->api('/me');
The ID stored in our DB was obtained using that same function, so we have no idea on why we are getting 2 different values for them.
Look at this example: IDs 1240467833 and 10207982855389470 belong to the same user (check https://www.facebook.com/10207982855389470 and https://www.facebook.com/1240467833 and you'll get redirected to the same profile).
Any idea why we are getting those two different IDs and how we can get the same ID every time?
Thanks