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

David Clements digidigo at gmail.com
Fri Jul 18 11:41:56 EDT 2008


We actually just added support for Bebo that should also support multiple
rails apps in one instance.  I tested it once in my dev environment.

Please try this in you facebooker.yml where foo is some unique prefix for
the config:

foo_api_key: f688cbe01c465d71e4f9bed26722309a
foo_secret_key: SECRETKEY
foo_canvas_page_name: app_canvas_page_name
foo_adapter: FacebookAdapter
foo_callback_url: http://mycoolfacebookapp.com

I think it requires the same callback_url as the other app, but I don't
remember if it can be different. If this gets a lot of use was can make it a
little cleaner.

Dave



On Thu, Jul 17, 2008 at 7:16 PM, Toby Hede <tobyhede at info-architects.net>
wrote:

> 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
> >
> >
> _______________________________________________
> Facebooker-talk mailing list
> Facebooker-talk at rubyforge.org
> http://rubyforge.org/mailman/listinfo/facebooker-talk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/facebooker-talk/attachments/20080718/c9a831c1/attachment.html>


More information about the Facebooker-talk mailing list