Module: Facebooker::Merb::Controller
- Defined in:
- lib/merb_facebooker/controller.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
-
#facebook_params ⇒ Object
initializes the @facebook_params instance using the method verified_facebook_params.
-
#facebook_session ⇒ Object
Just returns the @facebook_session instance variable.
-
#set_facebook_session ⇒ Object
Tries to secure the facebook_session, if it is not secured already, it tries to secure it via the request parameter ‘auth_token’, if that doesn’t work, it tries to use the parameters from facebook (this could be in the request or via cookies [cookies in case of FBConnect]).
Class Method Details
.included(controller) ⇒ Object
5 6 7 8 |
# File 'lib/merb_facebooker/controller.rb', line 5 def self.included(controller) controller.extend(ClassMethods) controller.before :set_fbml_format end |
Instance Method Details
#facebook_params ⇒ Object
initializes the @facebook_params instance using the method verified_facebook_params
34 35 36 |
# File 'lib/merb_facebooker/controller.rb', line 34 def facebook_params @facebook_params ||= verified_facebook_params end |
#facebook_session ⇒ Object
Just returns the @facebook_session instance variable
13 14 15 |
# File 'lib/merb_facebooker/controller.rb', line 13 def facebook_session @facebook_session end |
#set_facebook_session ⇒ Object
Tries to secure the facebook_session, if it is not secured already, it tries to secure it via the request parameter ‘auth_token’, if that doesn’t work, it tries to use the parameters from facebook (this could be in the request or via cookies [cookies in case of FBConnect]).
22 23 24 25 26 27 28 29 |
# File 'lib/merb_facebooker/controller.rb', line 22 def set_facebook_session session_set = session_already_secured? || secure_with_token! || secure_with_facebook_params! if session_set capture_facebook_friends_if_available! Session.current = facebook_session end session_set end |