[Facebooker-talk] integrating facebooker into an existing application
Jay McGaffigan
hooligan495 at verizon.net
Wed Apr 23 10:03:15 EDT 2008
Mike,
Do you want the specific callback?
It's http://hostname/jay (or do you want the real callback).
Let me describe my setup a little.
I am doing this Facebook application for work. Myself and one other guy are
working on the application. For firewall and security reasons IT has given
us a computer with an external ip (with only port 80 open and lot's of
protocols blocked). This computer will ultimately be running the
application. However for development I would like to get facebook to hit my
computer. So what I did (and if you have a better suggestion... I'm all
eyes) is take Apache and setup Mod_rewrite to forward requests to my dev box
that have the pattern, http://hostname/jay(/*) and requests that have the
pattern http://hostname/kevin(/*) (kevin's my coworker) forward requests to
his dev box. We each have our own sample application (is there a better way
to co develop a facebook application?).
I didn't realize the restriction that facebooker is imposing with the
callback_url but in hindsight it makes sense.
In "production" the issue I am having won't happen as I could just map the
callback url to the IP. But from a development scenario it would have been
nice.
Thanks!
Jay
-----Original Message-----
From: Mike Mangino [mailto:mmangino at elevatedrails.com]
Sent: Wednesday, April 23, 2008 9:17 AM
To: Jay McGaffigan
Cc: facebooker-talk at rubyforge.org
Subject: Re: [Facebooker-talk] integrating facebooker into an existing
application
Jay, can you tell us what your callback url is set to?
In general, we expect the callback url to be the same hostname as the
rest of your application.
Mike
On Apr 22, 2008, at 7:32 PM, Jay McGaffigan wrote:
> Hi all,
>
> So I am trying to understand how to integrate a facebook application
> into my
> web application. Mike has given me some good pointers. But I am at
> a point
> where I am rummaging through the code and have stumbled upon a
> problem that
> I am not sure how to resolve.
>
> The issue might be related to this fix:
> http://rubyforge.org/pipermail/facebooker-talk/2008-March/000471.html
>
> but I'm not sure.
>
> So let me describe my scenario.
>
> I have an existing web application. I want to integrate a Facebook
> application into it in such a way that after a demo of this we may
> want to
> pull the facebook app stuff into it's own web application.
>
> So to start I have added the plugin. And discovered the following
> dependency in the tests:
> Rails_integration_tests have a 'require "ruby-debug"' statement in
> it. I
> didn't have this gem installed and when I removed the require
> statement and
> the tests all passed except for one (which causes a warning in Ruby
> and an
> error in JRuby). A question I have here is ... is it worth pointing
> out the
> dependency on ruby-debug to this list? (I believe it's a native gem)
>
> Next I setup my application to use the proper session store.
> A quick jump to my app's homepage and all still looks well.
>
> Next I setup my facebooker.yml file. And the problems start for my
> web
> app's non-facebook pages. When I goto my homepage. The style
> information
> fails to load. This is due to the fact that all my resources are
> being
> referenced with a URL that looks like my callback_url.
> (http://ip/jay).
>
> If I undo the fix referenced in the URL above, my problem goes away,
> but I
> don't want to undo that fix without understanding the implications.
> Being
> new to using facebooker, does anyone have a couple of paragraphs
> they can
> share on how the routing works for facebooker?
>
> Any help would be super appreciated!
>
> Jay
>
> PS: I'll be at railsconf also and would be interested in joining
> for a beer
> if you'll have me :)
>
>
>
>
>
>
>
> _______________________________________________
> Facebooker-talk mailing list
> Facebooker-talk at rubyforge.org
> http://rubyforge.org/mailman/listinfo/facebooker-talk
--
Mike Mangino
http://www.elevatedrails.com
More information about the Facebooker-talk
mailing list