17 characthers Facebook user id gets stored with a different value in MYSQL using Facebook php SDK v2.10 -
$user = $response->getgraphuser(); $fid = $user['id']; echo($fid); //10155784607879101 //in mysql table 2147483647 in fid column following query $stmt = $dbh->prepare("insert users(fid) values (:fid)"); $stmt->bindparam(':fid', $fid); $stmt->execute(); //in case $fid not equals $stmt->bindparam(':fid', $fid);
i read in facebook developers documentation:
id numeric string id of person's user account. id unique each app , cannot used across different apps. our upgrade guide provides more information app-specific ids core
i cannot identify users when return on site , login using facebook. has suggestion?
thanks in advance,
adam
to store facebook id number need field unsigned bigint.
however, facebook lists data type of id string, should store alphanumeric type avoid breaking app in future (thanks cbroe pointing out).
Comments
Post a Comment