[Facebooker-talk] loading settings from database

Toby Hede tobyhede at info-architects.net
Thu Apr 3 00:19:06 EDT 2008


At the moment I just have a before_filter in my controller:

      ENV['FACEBOOK_API_KEY'] =  @app.api_key
      ENV['FACEBOOK_SECRET_KEY'] = @app.secret_key

Which seems to be working fine.



On Thu, Apr 3, 2008 at 1:47 PM, Jonathan Otto <jonathan.otto at gmail.com> wrote:
> You'll probably have to modify the plugin, at least
>  Facebooker::Session since right now the API key is loaded once at
>  plugin initialization, and if you're running more than 1 app, you'll
>  need to signal some way to indicate which keys to load.
>
>  One way to do this is to check for parameters in Application.rb with a
>  before_filter and set a new variable in the Facebooker::Session class.
>
>  Keep us updated on your progress, this would be a great contribution.
>
>
>
>  On Wed, Apr 2, 2008 at 8:23 PM, Toby Hede <tobyhede at info-architects.net> wrote:
>  > I'm just wondering what the best way to go about loading my API keys
>  >  from the database is ...
>  >
>  >  Should I simply place them in the ENV variable?
>  >
>  >  Is there a way better way to go about this?
>  >  _______________________________________________
>  >  Facebooker-talk mailing list
>  >  Facebooker-talk at rubyforge.org
>  >  http://rubyforge.org/mailman/listinfo/facebooker-talk
>  >
>


More information about the Facebooker-talk mailing list