Module: Facebooker::Rails::Controller
Defined Under Namespace
Modules: ClassMethods
Class Method Summary
collapse
Instance Method Summary
collapse
#render_publisher_error, #render_publisher_interface, #render_publisher_response, #wants_interface?
Class Method Details
.included(controller) ⇒ Object
7
8
9
10
11
12
13
|
# File 'lib/facebooker/rails/controller.rb', line 7
def self.included(controller)
controller.extend(ClassMethods)
controller.before_filter :set_facebook_request_format
controller.helper_attr :facebook_session_parameters
controller.helper_method :request_comes_from_facebook?
end
|
Instance Method Details
#create_facebook_session ⇒ Object
24
25
26
|
# File 'lib/facebooker/rails/controller.rb', line 24
def create_facebook_session
secure_with_facebook_params! || secure_with_cookies! || secure_with_token!
end
|
#facebook_params ⇒ Object
44
45
46
|
# File 'lib/facebooker/rails/controller.rb', line 44
def facebook_params
@facebook_params ||= verified_facebook_params
end
|
#facebook_session ⇒ Object
16
17
18
|
# File 'lib/facebooker/rails/controller.rb', line 16
def facebook_session
@facebook_session
end
|
#facebook_session_parameters ⇒ Object
20
21
22
|
# File 'lib/facebooker/rails/controller.rb', line 20
def facebook_session_parameters
{:fb_sig_session_key=>params[:fb_sig_session_key]}
end
|
#redirect_to(*args) ⇒ Object
prevent Facebooker from rendering fb:redirect
18
19
20
|
# File 'lib/facebooker/rails/cucumber.rb', line 18
def redirect_to(*args)
super
end
|
#set_facebook_session ⇒ Object
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
# File 'lib/facebooker/rails/controller.rb', line 28
def set_facebook_session
session_set = session_already_secured?
unless session_set
session_set = create_facebook_session
session[:facebook_session] = @facebook_session if session_set
end
if session_set
capture_facebook_friends_if_available!
Session.current = facebook_session
end
return session_set
end
|