vendor/plugins/facebooker/lib/facebooker.rb
# Sets the Facebook environment based on a hash of options. 
# By default the hash passed in is loaded from facebooker.yml, but it can also be passed in
# manually every request to run multiple Facebook apps off one Rails app. 
Sets the Facebook environment based on a hash of options.
By default the hash passed in is loaded from facebooker.yml, but it can also be passed in
manually every request to run multiple Facebook apps off one Rails app.
Sets the Facebook environment based on a hash of options . By default the hash passed in is loaded from facebooker . yml but it can also be passed in manually every request to run multiple Facebook apps off one Rails app .
def apply_configuration(config)
      ENV['FACEBOOK_API_KEY']             = config['api_key']
      ENV['FACEBOOK_SECRET_KEY']          = config['secret_key']
      ENV['FACEBOOKER_RELATIVE_URL_ROOT'] = config['canvas_page_name']
      ENV['FACEBOOKER_API']               = config['api']
      if config.has_key?('set_asset_host_to_callback_url')
        Facebooker.set_asset_host_to_callback_url = config['set_asset_host_to_callback_url'] 
      end
      if Object.const_defined?("ActionController") and Facebooker.set_asset_host_to_callback_url
        ActionController::Base.asset_host = config['callback_url'] 
      end
      Facebooker.timeout = config['timeout']
      @facebooker_configuration = config  
      load_adapter(:fb_sig_api_key => config['api_key'])
      facebooker_config
    end
def apply_configuration ( config ) ENV [ 'FACEBOOK_API_KEY' ] = config [ 'api_key' ] ENV [ 'FACEBOOK_SECRET_KEY' ] = config [ 'secret_key' ] ENV [ 'FACEBOOKER_RELATIVE_URL_ROOT' ] = config [ 'canvas_page_name' ] ENV [ 'FACEBOOKER_API' ] = config [ 'api' ] if config . has_key? ( 'set_asset_host_to_callback_url' ) Facebooker . set_asset_host_to_callback_url = config [ 'set_asset_host_to_callback_url' ] end if Object . const_defined? ( "ActionController" ) and Facebooker . set_asset_host_to_callback_url ActionController :: Base . asset_host = config [ 'callback_url' ] end Facebooker . timeout = config [ 'timeout' ] @facebooker_configuration = config load_adapter ( :fb_sig_api_key => config [ 'api_key' ] ) facebooker_config end
Sets the Facebook environment based on a hash of options.
Sets the Facebook environment based on a hash of options .
# must be set before adapter loaded
config
<not_specific>