Hi there, I''m wrapping my head around Facebooker to try and build some integration points between an existing ROR application and facebook. I''ve managed to get FB talking to my app but when I tried to access my ROR app directly I noticed that all requests for images, CSS, and JS files were being made through my callback_url. Commenting out the following line from Facebooker''s init.rb made this stop, but I''m not sure what else I might be breaking with this change: ActionController::Base.asset_host = FACEBOOKER[''callback_url''] if(ActionController::Base.asset_host.blank?) Any pointers? ---- We must be careful about what we pretend to be. - Kurt Vonnegut
Is there a reason you don''t want this? Otherwise, the browser will try to load your images via the Facebook canvas url, which won''t work. Facebook required all assets to be served from a FQDN. Mike On Jun 27, 2008, at 9:18 PM, jeff barrett wrote:> Hi there, > > I''m wrapping my head around Facebooker to try and build some > integration points between an existing ROR application and > facebook. I''ve managed to get FB talking to my app but when I tried > to access my ROR app directly I noticed that all requests for > images, CSS, and JS files were being made through my callback_url. > Commenting out the following line from Facebooker''s init.rb made > this stop, but I''m not sure what else I might be breaking with this > change: > > ActionController::Base.asset_host = FACEBOOKER[''callback_url''] > if(ActionController::Base.asset_host.blank?) > > > Any pointers? > > ---- > We must be careful about what we pretend to be. - Kurt Vonnegut > > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk-- Mike Mangino http://www.elevatedrails.com
Hi Mike, Sorry I didn''t make this more clear. Requesting assets from the callback_url makes sense to me when RoR is processing a request from FB. But when I access my app directly, say from http://localhost:3000, all of the assets are retrieved from the callback_url instead of http://localhost:3000. What I had assumed would happen is that for a FB request the callback_url would be used, and for a "regular" request the typical rails behavior would occur. Am I thinking about this correctly? Thanks. ---- We must be careful about what we pretend to be. - Kurt Vonnegut ----- Original Message ---- From: Mike Mangino <mmangino at elevatedrails.com> To: jeff barrett <zuk_ini at yahoo.com> Cc: facebooker-talk at rubyforge.org Sent: Saturday, June 28, 2008 2:51:18 PM Subject: Re: [Facebooker-talk] asset_host? Is there a reason you don''t want this? Otherwise, the browser will try to load your images via the Facebook canvas url, which won''t work. Facebook required all assets to be served from a FQDN. Mike On Jun 27, 2008, at 9:18 PM, jeff barrett wrote:> Hi there, > > I''m wrapping my head around Facebooker to try and build some > integration points between an existing ROR application and > facebook. I''ve managed to get FB talking to my app but when I tried > to access my ROR app directly I noticed that all requests for > images, CSS, and JS files were being made through my callback_url. > Commenting out the following line from Facebooker''s init.rb made > this stop, but I''m not sure what else I might be breaking with this > change: > > ActionController::Base.asset_host = FACEBOOKER[''callback_url''] > if(ActionController::Base.asset_host.blank?) > > > Any pointers? > > ---- > We must be careful about what we pretend to be. - Kurt Vonnegut > > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk-- Mike Mangino http://www.elevatedrails.com
I think your assumption makes sense, but that isn''t how Facebooker works. We might be able to make it work that way, but I don''t really see any benefit from it. Is there a reason that you need this behavior? Mike On Jun 30, 2008, at 12:21 PM, jeff barrett wrote:> Hi Mike, > > Sorry I didn''t make this more clear. Requesting assets from the > callback_url makes sense to me when RoR is processing a request from > FB. But when I access my app directly, say from http://localhost: > 3000, all of the assets are retrieved from the callback_url instead > of http://localhost:3000. What I had assumed would happen is that > for a FB request the callback_url would be used, and for a "regular" > request the typical rails behavior would occur. Am I thinking about > this correctly? > > Thanks. > > ---- > We must be careful about what we pretend to be. - Kurt Vonnegut > > > ----- Original Message ---- > From: Mike Mangino <mmangino at elevatedrails.com> > To: jeff barrett <zuk_ini at yahoo.com> > Cc: facebooker-talk at rubyforge.org > Sent: Saturday, June 28, 2008 2:51:18 PM > Subject: Re: [Facebooker-talk] asset_host? > > Is there a reason you don''t want this? Otherwise, the browser will try > to load your images via the Facebook canvas url, which won''t work. > Facebook required all assets to be served from a FQDN. > > Mike > > On Jun 27, 2008, at 9:18 PM, jeff barrett wrote: > >> Hi there, >> >> I''m wrapping my head around Facebooker to try and build some >> integration points between an existing ROR application and >> facebook. I''ve managed to get FB talking to my app but when I tried >> to access my ROR app directly I noticed that all requests for >> images, CSS, and JS files were being made through my callback_url. >> Commenting out the following line from Facebooker''s init.rb made >> this stop, but I''m not sure what else I might be breaking with this >> change: >> >> ActionController::Base.asset_host = FACEBOOKER[''callback_url''] >> if(ActionController::Base.asset_host.blank?) >> >> >> Any pointers? >> >> ---- >> We must be careful about what we pretend to be. - Kurt Vonnegut >> >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/facebooker-talk > > -- > Mike Mangino > http://www.elevatedrails.com-- Mike Mangino http://www.elevatedrails.com
Maybe I''m missing something... I think I can probably work around this behavior, but maybe I''m not understanding the goal of Facebooker. Is Facebooker built with the assumption that the only requests hitting the RoR app are FB requests. Or to put it another way, if my app serves content to non-FB and FB requests, don''t I want the non-FB requests to be handled exactly like the were before installing the Facebooker plugin? ---- We must be careful about what we pretend to be. - Kurt Vonnegut ----- Original Message ---- From: Mike Mangino <mmangino at elevatedrails.com> To: jeff barrett <zuk_ini at yahoo.com> Cc: facebooker-talk at rubyforge.org Sent: Monday, June 30, 2008 9:51:56 AM Subject: Re: [Facebooker-talk] asset_host? I think your assumption makes sense, but that isn''t how Facebooker works. We might be able to make it work that way, but I don''t really see any benefit from it. Is there a reason that you need this behavior? Mike On Jun 30, 2008, at 12:21 PM, jeff barrett wrote:> Hi Mike, > > Sorry I didn''t make this more clear. Requesting assets from the > callback_url makes sense to me when RoR is processing a request from > FB. But when I access my app directly, say from http://localhost: > 3000, all of the assets are retrieved from the callback_url instead > of http://localhost:3000. What I had assumed would happen is that > for a FB request the callback_url would be used, and for a "regular" > request the typical rails behavior would occur. Am I thinking about > this correctly? > > Thanks. > > ---- > We must be careful about what we pretend to be. - Kurt Vonnegut > > > ----- Original Message ---- > From: Mike Mangino <mmangino at elevatedrails.com> > To: jeff barrett <zuk_ini at yahoo.com> > Cc: facebooker-talk at rubyforge.org > Sent: Saturday, June 28, 2008 2:51:18 PM > Subject: Re: [Facebooker-talk] asset_host? > > Is there a reason you don''t want this? Otherwise, the browser will try > to load your images via the Facebook canvas url, which won''t work. > Facebook required all assets to be served from a FQDN. > > Mike > > On Jun 27, 2008, at 9:18 PM, jeff barrett wrote: > >> Hi there, >> >> I''m wrapping my head around Facebooker to try and build some >> integration points between an existing ROR application and >> facebook. I''ve managed to get FB talking to my app but when I tried >> to access my ROR app directly I noticed that all requests for >> images, CSS, and JS files were being made through my callback_url. >> Commenting out the following line from Facebooker''s init.rb made >> this stop, but I''m not sure what else I might be breaking with this >> change: >> >> ActionController::Base.asset_host = FACEBOOKER[''callback_url''] >> if(ActionController::Base.asset_host.blank?) >> >> >> Any pointers? >> >> ---- >> We must be careful about what we pretend to be. - Kurt Vonnegut >> >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/facebooker-talk > > -- > Mike Mangino > http://www.elevatedrails.com-- Mike Mangino http://www.elevatedrails.com
Hey Jeff, I am running a couple for Rails apps this way, web based and facebook based. The only difference in the requests is the use of an asset host. The only drawback to this that I have found is that in development mode the request for assets go through my SSH tunnel that I have setup , which can slow things up a bit. What are you running into that you need to workaround this behavior? Dave On Mon, Jun 30, 2008 at 1:09 PM, jeff barrett <zuk_ini at yahoo.com> wrote:> Maybe I''m missing something... I think I can probably work around this > behavior, but maybe I''m not understanding the goal of Facebooker. Is > Facebooker built with the assumption that the only requests hitting the RoR > app are FB requests. Or to put it another way, if my app serves content to > non-FB and FB requests, don''t I want the non-FB requests to be handled > exactly like the were before installing the Facebooker plugin? > > ---- > We must be careful about what we pretend to be. - Kurt Vonnegut > > > ----- Original Message ---- > From: Mike Mangino <mmangino at elevatedrails.com> > To: jeff barrett <zuk_ini at yahoo.com> > Cc: facebooker-talk at rubyforge.org > Sent: Monday, June 30, 2008 9:51:56 AM > Subject: Re: [Facebooker-talk] asset_host? > > I think your assumption makes sense, but that isn''t how Facebooker > works. We might be able to make it work that way, but I don''t really > see any benefit from it. Is there a reason that you need this behavior? > > Mike > > On Jun 30, 2008, at 12:21 PM, jeff barrett wrote: > > > Hi Mike, > > > > Sorry I didn''t make this more clear. Requesting assets from the > > callback_url makes sense to me when RoR is processing a request from > > FB. But when I access my app directly, say from http://localhost: > > 3000, all of the assets are retrieved from the callback_url instead > > of http://localhost:3000. What I had assumed would happen is that > > for a FB request the callback_url would be used, and for a "regular" > > request the typical rails behavior would occur. Am I thinking about > > this correctly? > > > > Thanks. > > > > ---- > > We must be careful about what we pretend to be. - Kurt Vonnegut > > > > > > ----- Original Message ---- > > From: Mike Mangino <mmangino at elevatedrails.com> > > To: jeff barrett <zuk_ini at yahoo.com> > > Cc: facebooker-talk at rubyforge.org > > Sent: Saturday, June 28, 2008 2:51:18 PM > > Subject: Re: [Facebooker-talk] asset_host? > > > > Is there a reason you don''t want this? Otherwise, the browser will try > > to load your images via the Facebook canvas url, which won''t work. > > Facebook required all assets to be served from a FQDN. > > > > Mike > > > > On Jun 27, 2008, at 9:18 PM, jeff barrett wrote: > > > >> Hi there, > >> > >> I''m wrapping my head around Facebooker to try and build some > >> integration points between an existing ROR application and > >> facebook. I''ve managed to get FB talking to my app but when I tried > >> to access my ROR app directly I noticed that all requests for > >> images, CSS, and JS files were being made through my callback_url. > >> Commenting out the following line from Facebooker''s init.rb made > >> this stop, but I''m not sure what else I might be breaking with this > >> change: > >> > >> ActionController::Base.asset_host = FACEBOOKER[''callback_url''] > >> if(ActionController::Base.asset_host.blank?) > >> > >> > >> Any pointers? > >> > >> ---- > >> We must be careful about what we pretend to be. - Kurt Vonnegut > >> > >> _______________________________________________ > >> Facebooker-talk mailing list > >> Facebooker-talk at rubyforge.org > >> http://rubyforge.org/mailman/listinfo/facebooker-talk > > > > -- > > Mike Mangino > > http://www.elevatedrails.com > > -- > Mike Mangino > http://www.elevatedrails.com > _______________________________________________ > 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/20080630/dc946079/attachment.html>