Permalink
Browse files

Fixes issue on integeresque api_key

In the facebooker.yml file, if the api_key looks more like a
Fixnum than a String (eg. just happens to not include any letters)
an exception is raised.

This trivial change ensures that api_key and secret_key are always
loaded as strings to ensure this doesn't happen.
  • Loading branch information...
1 parent a85c2fc commit 399f60714949cc433fb5032ac0dfb73dfd6f9bcd @jstirk committed Sep 11, 2010
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/facebooker.rb
View
@@ -54,8 +54,8 @@ def load_configuration(facebooker_yaml_file)
# 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['FACEBOOK_API_KEY'] = config['api_key'].to_s
+ ENV['FACEBOOK_SECRET_KEY'] = config['secret_key'].to_s
ENV['FACEBOOKER_RELATIVE_URL_ROOT'] = config['canvas_page_name']
ENV['FACEBOOKER_API'] = config['api']
if config.has_key?('set_asset_host_to_callback_url')

0 comments on commit 399f607

Please sign in to comment.