Skip to content

Instantly share code, notes, and snippets.

@antonrogov
Created July 18, 2009 13:12
Show Gist options
  • Save antonrogov/149560 to your computer and use it in GitHub Desktop.
Save antonrogov/149560 to your computer and use it in GitHub Desktop.
# config/initializers/facebooker.rb
module Facebooker
class << self
def fetch_config_for(api_key)
if app = Application.find_by_api_key(api_key)
{
'api_key' => app.api_key,
'secret_key' => app.secret,
'canvas_page_name' => app.canvas_name,
'callback_url' => app.callback_url,
'set_asset_host_to_callback_url' => true
}
else
nil
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment