[Facebooker-talk] Running multiple FB apps off the same Rails app

Toby Hede tobyhede at info-architects.net
Thu Jul 17 21:16:49 EDT 2008


I am doing this by using a filter and spoofing the ENV variables. Not
pretty but it works.

before_filter :authenticate

def authenticate
    @app = find_application

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

      ensure_application_is_installed_by_facebook_user
end

On Fri, Jul 18, 2008 at 11:02 AM, Robert Matei <rmatei at gmail.com> wrote:
> Hi all,
>
> I'm trying to do a few templatized apps. I want them to all run off the same
> Rails app, which would fetch the right 'theme' from a database based on
> params[:fb_sig_api_key]. The themes store the config details of each app, in
> addition to specific prompts and so on.
>
> Presumably this would need a modified Facebooker, which can work with
> multiple api key / secret key combos instead of a single facebooker.yml
> file.
>
> I'm not sure where to start though, and I figured I'd check with people who
> know Facebooker better than I do. Any suggestions?
>
> Robert
>
> _______________________________________________
> Facebooker-talk mailing list
> Facebooker-talk at rubyforge.org
> http://rubyforge.org/mailman/listinfo/facebooker-talk
>
>


More information about the Facebooker-talk mailing list