Login to website using Facebook account [closed]

只愿长相守 提交于 2019-12-04 14:23:52

问题


I want to implement SSO in our current website so that we can login to that website using a Facebook account. Can you please provide the steps which I need to follow to implement it?


回答1:


Try with this link
https://developers.facebook.com/docs/guides/web/




回答2:


Mixu had meticulously explained single sign-on in his 3 paged blog:

1) http://blog.mixu.net/2010/12/27/implementing-facebook-login-single-sign-on-part-1/

2) http://blog.mixu.net/2011/01/03/implementing-facebook-login-part-2/

3) http://blog.mixu.net/2011/01/09/implementing-facebook-login-part-3/

UPDATE

SSO is simply logging a user with facebook and maintaining a site-wide session on your server and cookie on user's machine. This session shall remain valid for all pages on your website. You can use this codeplex example in C# to get you going on the right track: http://facebooktoolkit.codeplex.com/

Also see this answer (in C#) for more info: https://stackoverflow.com/a/369691/842837




回答3:


There are many ways you can implement this. These architectures are explained in the Facebook developer page.

The simplest way is to implement it using javascript sdk. Here is a link on how to login using Facebook account.




回答4:


We can authenticate user from server side as well as client side.. if you are looking for a javascript solution then please refer below mentioned method.

  • Browse this link https://developers.facebook.com
    • Click on apps tab. >> It will promt you for login.
    • Once you are logged in >> you can create an new app in your account.
    • Click on settings tab(from left pannel)>> then click on "advanced" tab on the right window.
    • under "Valid OAuth redirect URIs" >> enter proper url (for testing you can enter your localhost url also, something like localhost.com:98 etc) if you are using iis you can configure the port number there.
    • if required you will have to put this url in your host file as well.
    • from the dashboard tab you can get the appid and secrect key for the newly created app.(we will need this in later stage).



回答5:


SSO is simply logging a user with facebook and maintaining a site-wide session on your server and cookie on user's machine. This session shall remain valid for all pages on your website. You can use this codeplex example in C# to get you going on the right track: http://facebooktoolkit.codeplex.com/



来源:https://stackoverflow.com/questions/9665928/login-to-website-using-facebook-account

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!