ADBlock is blocking some content on the site

ADBlock errore

facebook user_id stores strange numbers

StackOverflow https://stackoverflow.com/questions/8665945


i´m developing a Facebook Fanpage using PHP-SDK 3.0 and integrated a Facebook Registration Plugin. So far everthing works fine. I can store everthing.

The signed_request answered:

signed_request contents:  

Array (
     [algorithm] => HMAC-SHA256
     [expires] => 1324xxxx400
     [issued_at] => 132446xxx80
     [oauth_token] => AAADRjT73VhwBALl6Gb3EVarvyGU7xxxxxxxxxxxxxxxxxxxSAUuoZAGlydkX2pH3
     [registration] => Array () 

     [user_id] => 10xxxxxxx5426 )

For storing the data I use the following code:

$email = $response["registration"]["email"];
$user_fbid = $response["registration"]["user_id"];

$email = mysql_real_escape_string($email);
$user_fbid = mysql_real_escape_string($user_fbid);

// Inserting into users table 
$result = mysql_query("INSERT INTO member (email, userid) VALUES ($email, $user_fbid)

Here my question:

At first day the $result stored something like 214xxxx647 and next day it stores 217. But there is nothing similar like 10xxxxxxx5426


I think your problem is you are storing the user_id value into a "int" which means the maximum value that can be stored is 2147483647.

Facebook user_id's require a larger pool of numbers, therefore your should change the column datatype to BIGINT.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow