Module: Facebooked

Defined in:
lib/facebooked.rb

Instance Method Summary collapse

Instance Method Details

#facebook_sessionObject



4
5
6
7
8
9
10
11
12
# File 'lib/facebooked.rb', line 4

def facebook_session
  return unless cookie = cookies["fbs_#{self.class::APP_ID}"]
  
  fs = {}
  cookie.gsub(/"/, '').split('&').map{|str| str.split('=')}.each do |pair|
    fs[pair[0].to_sym] = pair[1]
  end
  fs
end