Fernando Correia
2008-Feb-01 22:31 UTC
[Facebooker-talk] Facebooker interfering with existing application
Hi! I have an existing application, basically a very simple Hobo app. It works... When I install the Facebooker plugin and create the facebooker.yml file (with valid or fake content, doesn''t matter), the original app starts behaving strangely. The controller and view logic keeps working, but several static files stop being served from http://localhost:3000/javascripts and start being searched for on http://someurl/javascripts, where someurl is the contents of the callback_url on facebooker.yml. This seems strange, because no other application file was touched: the controller, routes.rb, environment.rb, all are just as before. So, just by dropping the facebooker directory under vendor/plugins and by copying facebooker.yml to config, the app started looking for the static files on another URL. I really would like to be able to have both Hobo and Facebooker controllers and views on the same app. I also would like that the Facebooker only had some effect when I''m responding to a Facebook request, and that it left the normal Web request processing untouched. I''d appreciate if somebody can point me in the right direction. -- http://plainworks.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/facebooker-talk/attachments/20080201/460cfce8/attachment.html
Mike Mangino
2008-Feb-02 00:16 UTC
[Facebooker-talk] Facebooker interfering with existing application
You should definitely be able to have Hobo and Facebooker controllers on your same application. Does your callback url end up talking to your localhost:3000 server? If so, this shouldn''t cause a problem. If it doesn''t, your facebook application is misconfigured. We''re working on making this integration less invasive, but we aren''t there yet. Mike On Feb 1, 2008, at 4:31 PM, Fernando Correia wrote:> Hi! > > I have an existing application, basically a very simple Hobo app. It > works... > > When I install the Facebooker plugin and create the facebooker.yml > file (with valid or fake content, doesn''t matter), the original app > starts behaving strangely. > > The controller and view logic keeps working, but several static > files stop being served from http://localhost:3000/javascripts and > start being searched for on http://someurl/javascripts, where > someurl is the contents of the callback_url on facebooker.yml. > > This seems strange, because no other application file was touched: > the controller, routes.rb, environment.rb, all are just as before. > > So, just by dropping the facebooker directory under vendor/plugins > and by copying facebooker.yml to config, the app started looking for > the static files on another URL. > > I really would like to be able to have both Hobo and Facebooker > controllers and views on the same app. I also would like that the > Facebooker only had some effect when I''m responding to a Facebook > request, and that it left the normal Web request processing untouched. > > I''d appreciate if somebody can point me in the right direction. > > -- > http://plainworks.com _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk-- Mike Mangino http://www.elevatedrails.com
Mike Mangino
2008-Feb-02 22:44 UTC
[Facebooker-talk] Facebooker interfering with existing application
Try upgrading to the newest facebooker. Those problems should now be fixed. Mike On Feb 2, 2008, at 12:03 PM, Fernando Correia wrote:> On Feb 1, 2008 10:16 PM, Mike Mangino <mmangino at elevatedrails.com> > wrote: >> You should definitely be able to have Hobo and Facebooker controllers >> on your same application. Does your callback url end up talking to >> your localhost:3000 server? If so, this shouldn''t cause a problem. If >> it doesn''t, your facebook application is misconfigured. > > I appreciate your help. Now I understand that the Facebooker plugin > will affect all URLs of my app, not just those of Facebook > controllers. > > But I still don''t understand how I can set up the callback_url and > canvas_page_name configuration items so the previous controllers and > views can keep working and at the same time a new Facebook controller > can also work. > > I''d like to have a http://myurl/facebooker controller, where the > Facebook functionality is, and other controllers like > http://myurl/collections, where my normal app functionality is. > > Please advise. > > Details of my experience below: > > URLs of the working application, without Facebooker: > > 1a. http://localhost:3000/stylesheets/reset.css > 2a. http://localhost:3000/hobothemes/clean/stylesheets/application.css > 3a. http://localhost:3000/javascripts/prototype.js?1201903010 > 4a. http://localhost:3000/hobothemes/clean/images/spinner.gif > 5a. http://localhost:3000/collections/1 > > URLs after facebooker directory and facebooker.yml file are copied: > > 1b. http://localhost:3000/CANVASPAGENAME/stylesheets/reset.css [1] > 2b. http://localhost:3000/CANVASPAGENAME/hobothemes/clean/stylesheets/application.css > [1] > 3b. http://callbackurl/javascripts/prototype.js [2] > 4b. http://localhost:3000/CANVASPAGENAME/hobothemes/clean/images/spinner.gif > [1] > 5b. http://localhost:3000/CANVASPAGENAME/collections/1 [1] > > Patterns: > > [1] CANVASPAGENAME is appended to the base URL. > [2] The base URL is substituted for the callback URL. > > I can deal with the callback, but I really don''t know how to adjust > for the modification involving the canvas page name on so many URLs. > > routes.rb: > > ActionController::Routing::Routes.draw do |map| > # map.facebook_root > '''', :controller=>''facebook'', :conditions=>{:canvas=>true} > map.search ''search'', :controller => ''front'', :action => ''search'' > map.homepage '''', :controller => ''front'', :action => ''index'' > Hobo.add_routes(map) > map.connect '':controller/:action/:id'' > map.connect '':controller/:action/:id.:format'' > end > > facebooker.yml: > > development: > api_key: **************************** > secret_key: **************************** > canvas_page_name: CANVASPAGENAME > callback_url: http://CALLBACKURL/-- Mike Mangino http://www.elevatedrails.com