Im trying to get the uid but is retrieving different number.
FB.getLoginStatus(function(response) {
if (response.status === 'connected') {
alert ("Your UID is " + response.authResponse.userID);
}
});
I use Graph API tool and put me?fields=id . The result is 10000607333xxxx (CORRECT UID)
But when I use de js code at the bottom retrieve different uid 1493309240881506
I try with php $facebook->getUser() and is the same different number
What i am doing wrong ?
UPDATE Someone tell me that is the scopeduserid but i need the global uid because with this number i have to verify if is a FAN of my page
SELECT uid FROM page_fan WHERE page_id = '23223322332xxx' and uid="+user_id;
This fql select only gave me results with the global uid.
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Documento sin título</title>
<script src="http://connect.facebook.net/en_US/all.js"></script>
</head>
<body>
<div id="fb-root"></div>
<script>
FB.init(
{
appId : '52150228463xxxx',
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
FB.getLoginStatus(function(response) {
if (response.status === 'connected') {
alert ("Your UID is " + response.authResponse.userID);
}
});
</script>
</body>
</html>