Class: SimpleFacebookConnect::ConnectController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- SimpleFacebookConnect::ConnectController
- Defined in:
- app/controllers/simple_facebook_connect/connect_controller.rb
Instance Method Summary collapse
Instance Method Details
#authenticate ⇒ Object
4 5 6 |
# File 'app/controllers/simple_facebook_connect/connect_controller.rb', line 4 def authenticate redirect_to new_facebook_session.login_url end |
#connect ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'app/controllers/simple_facebook_connect/connect_controller.rb', line 8 def connect begin new_facebook_session(params['auth_token']) if facebook_user unless log_in_via_fb_id(facebook_user) || log_in_via_email_hash(facebook_user) redirect_to(signup_path) end else render(:nothing => true) end rescue FacebookApiError => e Rails.logger.warn e. redirect_to fb_authenticate_path end end |