No commit activity in last 3 years
No release in over 3 years
Devise OAuth2 Facebook extension for rails 3 and mongoid
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 1.1.1
 Project Readme
Only Rails 3 and Mongoid is supported.

Uses fbgraph (http://github.com/nsanta/fbgraph) v= 1.5.4


How to use
----------

Include the gem in Gemfile after devise:
  gem 'devise'
  gem 'devise_oauth2_facebook_mongoid'
  gem 'fbgraph', "~> 1.5.4"

Include the ':devise_oauth2_facebook' in your model:

  devise :database_authenticatable, :registerable, :confirmable,
         :recoverable, :rememberable, :trackable, :validatable, :devise_oauth2_facebook


Add the following config options:

$ config/initializers/devise.rb

  config.facebook_api_key = "KEY"
  config.facebook_api_secret = "SECRET"
  config.facebook_permissions = 'offline_access,email,publish_stream'

Good minimum to have is "offline_access,email"

Create a migration file to add the columns:

  add_column :users, :facebook_uid, :string
  add_column :users, :facebook_token, :string

Finally, update your view to include "Login with facebook" link:
  <%= link_to "Login with facebook", user_fb_auth_path %>