Javascript 如何使用facebook id登录网站

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3012203/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-23 02:55:01  来源:igfitidea点击:

How to login in website using facebook id

phpjavascriptfacebookfacebook-php-sdk

提问by BIBEKRBARAL

I have made a website on which a user has to log in using a username and password. I have seen these in so many website, we can connect through facebook account. And I want to add the same to my web site. How is it possible,using php sdk or the javascript sdk?

我制作了一个网站,用户必须使用用户名和密码登录。我在很多网站上看到过这些,我们可以通过 facebook 帐户联系。我想将相同的内容添加到我的网站。怎么可能,使用 php sdk 或 javascript sdk?

采纳答案by Lauri Lehtinen

The team at Facebook has spent considerable time documenting this, I would suggest you start there:

Facebook 的团队花了大量时间记录这一点,我建议你从那里开始:

http://developers.facebook.com/docs/guides/web#login
http://developers.facebook.com/docs/authentication/

http://developers.facebook.com/docs/guides/web#login
http://developers.facebook.com/docs/authentication/

回答by Marco Mariani

If possible, I would do like dracolytch writes hereand create a level of abstraction for both OpenID and Facebook. He is willing to share his code.

如果可能的话,我希望dracolytch 写在这里,并为 OpenID 和 Facebook 创建一个抽象级别。他愿意分享他的代码。

回答by sahara

Those links are what Facebook likes to call "Badges." Go to your profile. Scroll all the way to the bottom. On the lower left hand column you should see a link that says "Create Profile Badge." Click that. From there you can edit a Badge to show the info you'd like. At the end, it will give you some html code that you can copy and paste into another website or blog. When people click on your Badge, they will get sent directly to your Facebook info box. Source(s):

这些链接就是 Facebook 喜欢称之为“徽章”的东西。转到您的个人资料。一直滚动到底部。在左下方的列中,您应该会看到一个链接,上面写着“创建个人资料徽章”。单击那个。从那里您可以编辑徽章以显示您想要的信息。最后,它会为您提供一些 html 代码,您可以将其复制并粘贴到另一个网站或博客中。当人们点击您的徽章时,他们将被直接发送到您的 Facebook 信息框。来源:

http://www.facebook.com/badges.php

http://www.facebook.com/badges.php