diff --git a/facebooker2.gemspec b/facebooker2.gemspec new file mode 100644 index 0000000..234f941 --- /dev/null +++ b/facebooker2.gemspec @@ -0,0 +1,13 @@ +spec = Gem::Specification.new do |s| + s.name = 'facebooker2' + s.version = '0.0.1' + s.summary = "Facebook Connect integration library for ruby and rails" + s.description = "Facebook Connect integration library for ruby and rails" + s.files = Dir['lib/**/*.rb'] + s.require_path = 'lib' + s.has_rdoc = false + s.author = "Mike Mangino" + s.email = "mmangino@elevatedrails.com" + s.homepage = "http://developers.facebook.com/docs/api" + s.add_dependency('mogli', ">=0.0.4") +end diff --git a/lib/facebooker2.rb b/lib/facebooker2.rb index 9b2342f..773ca0e 100644 --- a/lib/facebooker2.rb +++ b/lib/facebooker2.rb @@ -21,5 +21,6 @@ end require "facebooker2/rails/controller" require "facebooker2/rails/helpers/facebook_connect" +require "facebooker2/rails/helpers/javascript" require "facebooker2/rails/helpers/user" require "facebooker2/rails/helpers" \ No newline at end of file diff --git a/lib/facebooker2/rails/helpers.rb b/lib/facebooker2/rails/helpers.rb index bf2a227..4a80c3b 100644 --- a/lib/facebooker2/rails/helpers.rb +++ b/lib/facebooker2/rails/helpers.rb @@ -2,6 +2,7 @@ module Facebooker2 module Rails module Helpers include FacebookConnect + include Javascript include User end end diff --git a/lib/facebooker2/rails/helpers/javascript.rb b/lib/facebooker2/rails/helpers/javascript.rb new file mode 100644 index 0000000..0271a9a --- /dev/null +++ b/lib/facebooker2/rails/helpers/javascript.rb @@ -0,0 +1,34 @@ +module Facebooker2 + module Rails + module Helpers + module Javascript + def fb_connect_async_js(app_id,options={}) + opts = Hash.new(true).merge!(options) + cookie = opts[:cookie] + status = opts[:status] + status = opts[:xfbml] + js = <<-JAVASCRIPT +
+ + JAVASCRIPT + end + end + end + end +end \ No newline at end of file diff --git a/lib/facebooker2/rails/helpers/user.rb b/lib/facebooker2/rails/helpers/user.rb index 5d60c00..3236432 100644 --- a/lib/facebooker2/rails/helpers/user.rb +++ b/lib/facebooker2/rails/helpers/user.rb @@ -1,4 +1,3 @@ -require "ruby-debug" module Facebooker2 module Rails module Helpers