CodeIgniter Forums
How to integrate Facebook Connect - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22)
+--- Thread: How to integrate Facebook Connect (/showthread.php?tid=30615)



How to integrate Facebook Connect - El Forum - 05-20-2010

[eluser]JanDoToDo[/eluser]
Hey guys.

Im trying to integrate the facebook API so that users can log onto my site using facebook and have come into some problems in how im thinking.

My question is how does this actually work with regards to the database?

I have existing users as well as new users that i want to be able to log in with facebook. However, with the existing users, how do I know which user the facebook information relates to. Obviously, if they click the "login with facebook icon" then I have none of their information from my own database.

Also, with new users, do i have to store another field in my database now - user_id as well as facebook_id to compare against to see which user it is?

Any thoughts much appreciated.
Cheers :-)


How to integrate Facebook Connect - El Forum - 05-20-2010

[eluser]Jamie Rumbelow[/eluser]
Once they've authenticated with Facebook for the first time, you should get them to fill in a small bit of information on your site too. That way you can also give them the option to connect their current account with their Facebook account. New users have a Facebook-initiated account and current users connect their Facebook account to their account your site.

Jamie


How to integrate Facebook Connect - El Forum - 05-21-2010

[eluser]RaZoR LeGaCy[/eluser]
Hey Jamie, is there a detailed guide that you know of because I have the same issue. Just unsure in the grans scheme of things. I can google but cool if you knew a full tutorial about integrating with existing users DB.

Thank you