Closed (fixed)
Project:
Facebook Connect
Version:
6.x-1.0-beta8
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
26 Aug 2009 at 18:53 UTC
Updated:
16 Apr 2010 at 10:40 UTC
I did a quick search and I didn't find any bug report about this issue.
I was testing the FB connect module on a site and I just realized that sometimes I was logged in with a random user when I try to log in with a facebook account, it just happens for a couple of FB accounts.
Looking at the code I found that sometimes the fbuid is longer that 10 chars, so it doesn't fit into a int variable in the DB.
What I did to fix the issue was to change in the DB the datatype for the 'fbuid' column on the 'fbconnect_users' table, and then I did the changes that you can see in the patch file.
I hope this can help someone.
| Comment | File | Size | Author |
|---|---|---|---|
| fbconnect.module.patch | 959 bytes | leospataro |
Comments
Comment #1
ha5bro commentedI was having the exact same problem on a contest website, glad that I'm not alone. I'd really like to see this issue get fixo.
(Personally) I'm not a fan of facebook, but it is undeniable that FBConnect is a great way to grow a website.
Comment #2
scottgifford commentedSame problem exists on 5.x. This is quite a big deal, since many newer Facebook UIDs are too big to fit into a 32-bit integer.
BIGINTmight be a better SQL column type to use. That should accommodate all Facebook UIDs without requiring any code changes.Comment #3
rf-pldev commentedI believe this issue has been brought up before, I can't remember if it was here or re the Facebook module. In any case, FB has been recommending BIGINT for a while (at least a year), ever since they announced the larger user IDs:
"The user ID is a 64-bit int datatype. If you're storing it in a MySQL database, use the BIGINT unsigned datatype."
http://wiki.developers.facebook.com/index.php/User_ID
take note of unsigned
Comment #4
scottgifford commentedThanks, I was just in the process of not taking into account unsigned. :-)
Since Postgres doesn't support an unsigned bigint, I guess I'll be using a string after all.
Thanks!
Comment #5
leospataro commentedGuys, keep in mind that you will have to change the db query to support larger int values, %d on the query won't work
Comment #6
vectoroc commented