Is Facebook Connect a practical way of importing users? How does it do it?
Those are basically the questions because I saw you need to create a new table for users that log using "Login with Facebook Connect". Please don't reply with fb connect developers website because I've been there already and I've already read about the "wonderfully unsafe" features of this API .Apparently I haven't fully understood it. I 'm 开发者_运维技巧asking this because I would like to implement the feature on an OpenID Provider so that when someone logs in with his facebook account he automatically gets an OpenID. I know it sounds kind of confusing since both technologies basically do the same thing regarding authentication (I'm not interesting in a Fb Connect vs OpenID answer either) but I could really appreciate some help
Facebook Connect is great in terms of lowering the barrier for users — I've seen it really boost the number of users who authenticate on a site, and it also helps bring people back for return visits. It gives you some information to import (name, user id, etc.), and helps you personalize the site a bit. If you need to do this to tie a user to an ID, you can probably do that either with their user id or the third party id (a different parameter entirely) that you get back from the API.
It's probably not going to give you everything you need, but you might want to look specifically at the Facebook Registration social plug-in too: http://developers.facebook.com/docs/plugins/registration/. I know you've said you'd read the docs, but that one is specifically worth a look if you need additional information at sign-in from users. In your case, it might help if you need more info.
Not sure that helps with what you're looking for exactly, but hopefully it's a start?
I would use Facebook Connect (OAuth) to get the users basic information like facebook_id, email, name, city, country - and then save them into my own database as a new registered user.
When they register in that way via Facebook I would give them a authenticated session on my site as well. When they return you can auto authenticate them by checking their facebook session.
If they enter their data into your login system I would authenticate them by connecting to facebook with the facebook_id you have saved in your database.
I hope this helps a bit :)
精彩评论