forked from mmangino/facebooker
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
160 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
generators/receiver/receiver_generator.rb → ...tors/xd_receiver/xd_receiver_generator.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
module Facebooker | ||
module Rails | ||
module Helpers | ||
module FbConnect | ||
|
||
def fb_connect_javascript_tag | ||
javascript_include_tag "http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php" | ||
end | ||
|
||
def init_fb_connect(*required_features) | ||
init_string = "FB.Facebook.init('#{Facebooker.api_key}','/xd_receiver.html');" | ||
unless required_features.blank? | ||
init_string = <<-FBML | ||
Element.observe(window,'load', function() { | ||
FB_RequireFeatures(#{required_features.to_json}, function() { | ||
#{init_string} | ||
}); | ||
}); | ||
FBML | ||
end | ||
javascript_tag init_string | ||
end | ||
|
||
def fb_login_button(callback=nil) | ||
content_tag("fb:login-button",nil,(callback.nil? ? {} : {:onlogin=>callback})) | ||
end | ||
|
||
def fb_unconnected_friends_count | ||
content_tag "fb:unconnected-friends-count",nil | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.