Refactor facebook.rb