使用Devise的Rails 3:如何让某人使用他们的Facebook帐户登录? [英] Rails 3 using Devise: How to allow someone to log in using their Facebook account?

查看:132
本文介绍了使用Devise的Rails 3:如何让某人使用他们的Facebook帐户登录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用 Devise 进行身份验证的Rails 3应用程序。现在我需要允许某人使用他们的Facebook帐户登录。我认为这是Facebook Connect,但我也听说过Facebook Graph API这个词,所以我不知道我要求哪一个。

I have a Rails 3 application using Devise for authentication. Now I need to allow someone to log in using their Facebook account. I think this is called Facebook Connect, but I've also heard the term Facebook Graph API, so I'm not sure which one I'm asking for.

什么为了将Facebook Connect与Devise整合,我需要做些什么?

What do I need to do in order to integrate Facebook Connect with Devise?

这个问题很漂亮老了一年前,Devise v1.2推出了 OmniAuth 支持。现在,Devise是v2.1(在撰写本文时),使用OmniAuth更容易。以下是Devise wiki上有关使用 omniauth- Facebook 宝石与Devise允许使用Facebook登录

This question is pretty old now. A year ago, Devise v1.2 introduced OmniAuth support. Now Devise is at v2.1 (as of this writing) and using OmniAuth is even easier. Here is a great tutorial from the Devise wiki on using the omniauth-facebook gem with Devise to allow sign-in using Facebook.

还查看了这个伟大的教程注册您的应用程序并使用Facebook Graph API

Also check out this great tutorial on registering your application and working with the Facebook Graph API.

推荐答案

Devise 1.2现在带有使用omniauth的Facebook登录支持,并与Rails 3.0一起使用。查看维基条目

Devise 1.2 now comes with facebook login support using omniauth and works with Rails 3.0. Check out the wiki entry.

这篇关于使用Devise的Rails 3:如何让某人使用他们的Facebook帐户登录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆