I am about to launch a website that offers registration. I have just thought of implementing the Facebook Connect for login/signup.
Anyone has any recommendations on how to do it properly?
I started by loading the script, 开发者_C百科I am now at the point where I have the user's public data (userid,first name,last name etc..).
Now I have a few questions:
- Should I allow registrations from both FB users and non-fb users?
- For the Facebook users, should I just take the public data of each users that signs up, add it to the same users database where I store the non-fb users data?
Thanks,
- Depends on your audience, but for any site that is not a facebook application I would give the user both options.
- Seperating the users in different tables will probably only make it harder for you later on when you try to add more logic. You can either make an extra field storing the facebook uid, or make an extra table, linking a user to a facebook user.
When I was implementing facebook/google login, I found this document very useful (it's from google, but the ideas in the work for every 3rd party): http://sites.google.com/site/oauthgoog/UXFedLogin/summary
Yes, do not limit your login/registration to another applications API. Granted this makes it easier to access your application, this may drive people away if they have to login using their facebook information.
How you store your data is up to you but I would store them both in the same database and have an extra row that denotes them being logged in via FB connect.
精彩评论