Conceptual confusion with facebook connect


#1

Slightly off topic, but I’m exploring FB connect integration with my
rails site.

Right now I have an application with a User model, and that user model
links to all of my other models, such as comments, votes, etc. As I
understand it, FB connect lets users log in without having to log in
to my site. So what do I do, just create a pseudo user for each
facebook connect login?

Alternatively, can I / should I have existing users associate their FB
accounts with my site’s user accounts?

If two users log in to my site using only FB connect, and they’re
friends on FB, is there any way for me to tell that?

Thanks for any advice/input.

Dino


#2

On Mon, Jan 12, 2009 at 2:25 PM, dino d. removed_email_address@domain.invalid wrote:

Slightly off topic, but I’m exploring FB connect integration with my
rails site.

Right now I have an application with a User model, and that user model
links to all of my other models, such as comments, votes, etc. As I
understand it, FB connect lets users log in without having to log in
to my site. So what do I do, just create a pseudo user for each
facebook connect login?

This really depends on how you configure your site. If you use the
privacy
controls that’s provided by the framework, then they would be properly
authenticated
to your site as they are to facebook.com.

Alternatively, can I / should I have existing users associate their FB
accounts with my site’s user accounts?

If two users log in to my site using only FB connect, and they’re
friends on FB, is there any way for me to tell that?

I would highly recommend reading the development documents at

http://wiki.developers.facebook.com/index.php/Facebook_Connect

Also, you’ll find a live demo here:

http://www.somethingtoputhere.com/therunaround

Good luck,

-Conrad


#3

Thanks Conrad. I’m still confused though. I have a model called
User that has the following:

has_many :comments

Now, when my user logs in and leaves a comment, I say something like

comment = Comment.new

user.comments << comment

Now, suppose a Facebook user authenticates with FB connect. Now
what? How do I keep track of this users comments?

I’ve read both of those links but they don’t really address how you
treat a facebook user as a data point in your site.


#4

I’m getting closer to an answer, I found this link which talks about
linking accounts (your users and facebook users):

http://wiki.developers.facebook.com/index.php/Account_Linking

If I get this working, I’ll post an update.

Dino