mmangino-facebooker 1.0.10 → 1.0.11
Sign up to get free protection for your applications and to get access to all the features.
@@ -90,7 +90,7 @@ module ActionView
|
|
90
90
|
# Altered to throw an error on :popup and sanitize the javascript
|
91
91
|
# for Facebook.
|
92
92
|
def convert_options_to_javascript_with_facebooker!(html_options, url ='')
|
93
|
-
if !request_comes_from_facebook?
|
93
|
+
if !respond_to?(:request_comes_from_facebooker?) || !request_comes_from_facebook?
|
94
94
|
convert_options_to_javascript_without_facebooker!(html_options,url)
|
95
95
|
else
|
96
96
|
confirm, popup = html_options.delete("confirm"), html_options.delete("popup")
|
@@ -4,7 +4,11 @@ module Facebooker
|
|
4
4
|
module FbConnect
|
5
5
|
|
6
6
|
def fb_connect_javascript_tag
|
7
|
-
|
7
|
+
if request.ssl?
|
8
|
+
javascript_include_tag "https://www.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php"
|
9
|
+
else
|
10
|
+
javascript_include_tag "http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php"
|
11
|
+
end
|
8
12
|
end
|
9
13
|
|
10
14
|
def init_fb_connect(*required_features)
|
@@ -31,4 +35,4 @@ module Facebooker
|
|
31
35
|
end
|
32
36
|
end
|
33
37
|
end
|
34
|
-
end
|
38
|
+
end
|
@@ -396,6 +396,9 @@ module Facebooker
|
|
396
396
|
returning ActionView::Base.new([template_root,controller_root], assigns, self) do |template|
|
397
397
|
template.controller=self
|
398
398
|
template.extend(self.class.master_helper_module)
|
399
|
+
def template.request_comes_from_facebook?
|
400
|
+
true
|
401
|
+
end
|
399
402
|
end
|
400
403
|
end
|
401
404
|
|
data/lib/facebooker/service.rb
CHANGED