Login with Facebook/Twitter - Authentication
I am thinking of adding a login with twitter OR facebook on my website.
Although, I am in a doubt on how to do this. I have a normal registration system on my website, and I authenticate the users by sessions.
If I wish to intre开发者_高级运维grate the "login with facebook" and "login with twitter", how would the best way to store the users in my database?
I know that when users are logging in with facebook/twitte, a token is stored.
I have a users table with many columns like:
username, email, balance, clicks etc. etc.
What would be the best way? Is it better to use register with facebook or register with twitter (does that even exist?)
I am using PHP.
Thanks in advance.
yes it exists. You can simply use facbook api for that purpose. you can go through http://www.facebook.com/help/?page=730 and it gives you data in return which you can save in your db for further process. Like facebook user id , username and etc but not the password (remember) and same way for twitter
精彩评论