facebooker2/lib/facebooker2.rb

25 lines
495 B
Ruby
Raw Normal View History

2010-05-04 16:30:49 +00:00
# Facebooker2
2010-05-05 16:07:05 +00:00
require "mogli"
2010-05-05 15:42:11 +00:00
module Facebooker2
class << self
attr_accessor :api_key, :secret, :app_id
end
2010-05-05 16:07:05 +00:00
def self.cast_to_facebook_id(object)
if object.kind_of?(Mogli::Profile)
object.id
elsif object.respond_to?(:facebook_id)
object.facebook_id
else
object
end
end
2010-05-05 15:42:11 +00:00
end
require "facebooker2/rails/controller"
2010-05-05 16:07:05 +00:00
require "facebooker2/rails/helpers/facebook_connect"
require "facebooker2/rails/helpers/user"
require "facebooker2/rails/helpers"