简体   繁体   English

如何允许我网站的用户通过 Facebook 登录/注册并将 Facebook 登录系统与我自己的登录系统集成?

[英]How to allow users of my site to login/register via Facebook and integrate Facebook login system with my own login system?

I am just lost and do not know where to begin, please show me documentation I can read to let users register/login to my site using Facebook.我只是迷路了,不知道从哪里开始,请告诉我的文档我可以阅读,让用户使用Facebook的注册/登录我的网站。

Assuming that假如说

  • I have my own registration/login system我有自己的注册/登录系统

How can I我怎么能够

  • Log in users with their Facebook profile使用他们的 Facebook 个人资料登录用户
  • Register users quickly with their Facebook profile if they are not registered如果用户未注册,请使用他们的 Facebook 个人资料快速注册用户

Any ideas or docs are appreciated.任何想法或文档表示赞赏。

First, you need to register an facebook app at https://developers.facebook.com/apps .首先,您需要在https://developers.facebook.com/apps注册一个 facebook 应用程序。 Then this code will be a good starting point for you:那么这段代码对你来说将是一个很好的起点:

<iframe src="https://www.facebook.com/plugins/registration?
             client_id=YOUR_APP_ID&
             redirect_uri=https%3A%2F%2Fdevelopers.facebook.com%2Ftools%2Fecho%2F&
             fields=name,birthday,gender,location,email"
        scrolling="auto"
        allowTransparency="true"
        width="100%"
        height="400">
</iframe>

Full documentation of the registration plugin can be found here: https://developers.facebook.com/docs/plugins/registration/可以在此处找到注册插件的完整文档: https : //developers.facebook.com/docs/plugins/registration/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM