Hi guys, I am new to this list and thought i''d say hello. I am using facebooker on a new project and so far I am really pleased with it. I saw that some users are having woes with the url_rewriter breaking urls for paths outside of the facebook canvas (i.e. your site supports both facebook and non-facebook users). I don''t have a prefect answer for this but I wrote a plugin called facebooker_extensions which essentially reverts this change until I figure out a way to smartly format the url from either a facebook or nonfacebook request. I also started to extend the test_helper with more example xml responses. http://plugins.svn.locusfoc.us/browser/trunk/facebooker_extensions/ init.rb If someone figures out the routing problems let me know I am eager to tie it back into my app. Later, Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/facebooker-talk/attachments/20071204/3df6ee39/attachment.html
Can you give us a little more information about the url_rewriter breakage? Canvas urls should now link to canvas urls, and non-canvas urls should no longer include the canvas path. You use the :canvas=>true or :canvas=>false to override this behavior. Mike On Dec 4, 2007, at 3:48 PM, Heavy Sixer wrote:> Hi guys, > I am new to this list and thought i''d say hello. I am using > facebooker on a new project and so far I am really pleased with it. > I saw that some users are having woes with the url_rewriter breaking > urls for paths outside of the facebook canvas (i.e. your site > supports both facebook and non-facebook users). I don''t have a > prefect answer for this but I wrote a plugin called > facebooker_extensions which essentially reverts this change until I > figure out a way to smartly format the url from either a facebook or > nonfacebook request. > > I also started to extend the test_helper with more example xml > responses. > > http://plugins.svn.locusfoc.us/browser/trunk/facebooker_extensions/init.rb > > If someone figures out the routing problems let me know I am eager > to tie it back into my app. > > Later, > Mark > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk-- Mike Mangino http://www.elevatedrails.com
Hey Mike, Thanks for the reply, here is what I can tell you about my experience with the routing issues so far: 1. I am trying to deploy a facebook app inside an existing application, whereby my facebook app is only accessed from one controller and the rest of the app behaves as normal. 2. I am running rails 1.2.3 and when the plugin is installed and I run the plugin out of the box it overwrites all of my relative paths for my rails application not just the controller i want to use as my facebook controller. For example, all my CSS and Javascript URLS are prepended with the facebooker relative url root in my example it is: ENV[''FACEBOOKER_RELATIVE_URL_ROOT''] = ''facebook_accounts'' which produces urls like this: <script src="http://localhost:3000/facebook_accounts/javascripts/ prototype.js?1196361503" type="text/javascript"></script> which I of-course do not want :-) This may be happening because I do not completely understand how I "should" be using this plugin. If you see anything amiss in my approach let me know! Later, Mark On Dec 5, 2007, at 12:29 PM, Mike Mangino wrote:> Can you give us a little more information about the url_rewriter > breakage? Canvas urls should now link to canvas urls, and non- > canvas urls should no longer include the canvas path. You use > the :canvas=>true or :canvas=>false to override this behavior. > > Mike > > On Dec 4, 2007, at 3:48 PM, Heavy Sixer wrote: > >> Hi guys, >> I am new to this list and thought i''d say hello. I am using >> facebooker on a new project and so far I am really pleased with >> it. I saw that some users are having woes with the url_rewriter >> breaking urls for paths outside of the facebook canvas (i.e. your >> site supports both facebook and non-facebook users). I don''t have >> a prefect answer for this but I wrote a plugin called >> facebooker_extensions which essentially reverts this change until >> I figure out a way to smartly format the url from either a >> facebook or nonfacebook request. >> >> I also started to extend the test_helper with more example xml >> responses. >> >> http://plugins.svn.locusfoc.us/browser/trunk/facebooker_extensions/ >> init.rb >> >> If someone figures out the routing problems let me know I am eager >> to tie it back into my app. >> >> Later, >> Mark >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/facebooker-talk > > -- > Mike Mangino > http://www.elevatedrails.com > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/facebooker-talk/attachments/20071205/dd6cd158/attachment-0001.html
Are you installing facebooker as a plugin or as a gem? This should just work if you install it as a plugin. If it doesn''t, it''s a bug I need to fix. Mike On Dec 5, 2007, at 4:17 PM, Heavy Sixer wrote:> Hey Mike, > Thanks for the reply, here is what I can tell you about my > experience with the routing issues so far: > > 1. I am trying to deploy a facebook app inside an existing > application, whereby my facebook app is only accessed from one > controller and the rest of the app behaves as normal. > > 2. I am running rails 1.2.3 and when the plugin is installed and I > run the plugin out of the box it overwrites all of my relative paths > for my rails application not just the controller i want to use as my > facebook controller. For example, all my CSS and Javascript URLS are > prepended with the facebooker relative url root in my example it is: > > ENV[''FACEBOOKER_RELATIVE_URL_ROOT''] = ''facebook_accounts'' > > > which produces urls like this: > > <script src="http://localhost:3000/facebook_accounts/javascripts/prototype.js?1196361503 > " type="text/javascript"></script> > > which I of-course do not want :-) > > This may be happening because I do not completely understand how I > "should" be using this plugin. If you see anything amiss in my > approach let me know! > > Later, > Mark > > > > On Dec 5, 2007, at 12:29 PM, Mike Mangino wrote: > >> Can you give us a little more information about the url_rewriter >> breakage? Canvas urls should now link to canvas urls, and non- >> canvas urls should no longer include the canvas path. You use >> the :canvas=>true or :canvas=>false to override this behavior. >> >> Mike >> >> On Dec 4, 2007, at 3:48 PM, Heavy Sixer wrote: >> >>> Hi guys, >>> I am new to this list and thought i''d say hello. I am using >>> facebooker on a new project and so far I am really pleased with >>> it. I saw that some users are having woes with the url_rewriter >>> breaking urls for paths outside of the facebook canvas (i.e. your >>> site supports both facebook and non-facebook users). I don''t have >>> a prefect answer for this but I wrote a plugin called >>> facebooker_extensions which essentially reverts this change until >>> I figure out a way to smartly format the url from either a >>> facebook or nonfacebook request. >>> >>> I also started to extend the test_helper with more example xml >>> responses. >>> >>> http://plugins.svn.locusfoc.us/browser/trunk/facebooker_extensions/init.rb >>> >>> If someone figures out the routing problems let me know I am eager >>> to tie it back into my app. >>> >>> Later, >>> Mark >>> _______________________________________________ >>> 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
Hi Mike, Sure thing here is how you can recreate it: 1. Create a stub application MOS6507:~/Desktop markdaggett$ rails facebooker_test 2. Install the plugin MOS6507:~/Desktop/facebooker_test markdaggett$ ruby script/plugin install http://facebooker.rubyforge.org/svn/trunk/facebooker/ 3. Create a default resource MOS6507:~/Desktop/facebooker_test markdaggett$ ruby script/generate resource users 4. Add the environment params ENV[''FACEBOOKER_RELATIVE_URL_ROOT''] = ''canvas_path'' ENV[''FACEBOOK_API_KEY''] = ''123456'' ENV[''FACEBOOK_SECRET_KEY''] = ''654321'' 5. Create a default application.rhtml layout <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="content-type" content="text/html;charset=UTF-8" /> <title></title> <%= javascript_include_tag :defaults -%> </head> <body> <div id="wrap"> <%= yield %> </div> </body> </html> 6. Start the server and navigate to the url in question: http://localhost:3000/users it will produce incorrect relative paths for the layout: <script src="/canvas_path/javascripts/prototype.js?1196956262" type="text/javascript"></script> In contrast to what I claimed earlier that the link_tos and urls_for were being overridden it appears that the only problem I am actually having is with the scripts being looked for in the wrong place, so it may not be a routing issue per-say. Let me know if that is helpful at all or if I am just misunderstanding how to use the plugin. Best, Mark On Dec 6, 2007, at 9:37 AM, Mike Mangino wrote:> Can you give me an example of where the wrong link is generated? > I''d really like to get some test cases added and get this fixed. > > Mike > > On Dec 5, 2007, at 6:00 PM, Heavy Sixer wrote: > >> Hi Mike I am installing this as a plugin. >> >> On Dec 5, 2007, at 5:34 PM, Mike Mangino wrote: >> >>> Are you installing facebooker as a plugin or as a gem? >>> >>> This should just work if you install it as a plugin. If it >>> doesn''t, it''s a bug I need to fix. >>> >>> Mike >>> >>> On Dec 5, 2007, at 4:17 PM, Heavy Sixer wrote: >>> >>>> Hey Mike, >>>> Thanks for the reply, here is what I can tell you about my >>>> experience with the routing issues so far: >>>> >>>> 1. I am trying to deploy a facebook app inside an existing >>>> application, whereby my facebook app is only accessed from one >>>> controller and the rest of the app behaves as normal. >>>> >>>> 2. I am running rails 1.2.3 and when the plugin is installed and >>>> I run the plugin out of the box it overwrites all of my relative >>>> paths for my rails application not just the controller i want to >>>> use as my facebook controller. For example, all my CSS and >>>> Javascript URLS are prepended with the facebooker relative url >>>> root in my example it is: >>>> >>>> ENV[''FACEBOOKER_RELATIVE_URL_ROOT''] = ''facebook_accounts'' >>>> >>>> >>>> which produces urls like this: >>>> >>>> <script src="http://localhost:3000/facebook_accounts/javascripts/ >>>> prototype.js?1196361503" type="text/javascript"></script> >>>> >>>> which I of-course do not want :-) >>>> >>>> This may be happening because I do not completely understand how >>>> I "should" be using this plugin. If you see anything amiss in my >>>> approach let me know! >>>> >>>> Later, >>>> Mark >>>> >>>> >>>> >>>> On Dec 5, 2007, at 12:29 PM, Mike Mangino wrote: >>>> >>>>> Can you give us a little more information about the >>>>> url_rewriter breakage? Canvas urls should now link to canvas >>>>> urls, and non-canvas urls should no longer include the canvas >>>>> path. You use the :canvas=>true or :canvas=>false to override >>>>> this behavior. >>>>> >>>>> Mike >>>>> >>>>> On Dec 4, 2007, at 3:48 PM, Heavy Sixer wrote: >>>>> >>>>>> Hi guys, >>>>>> I am new to this list and thought i''d say hello. I am using >>>>>> facebooker on a new project and so far I am really pleased >>>>>> with it. I saw that some users are having woes with the >>>>>> url_rewriter breaking urls for paths outside of the facebook >>>>>> canvas (i.e. your site supports both facebook and non-facebook >>>>>> users). I don''t have a prefect answer for this but I wrote a >>>>>> plugin called facebooker_extensions which essentially reverts >>>>>> this change until I figure out a way to smartly format the url >>>>>> from either a facebook or nonfacebook request. >>>>>> >>>>>> I also started to extend the test_helper with more example xml >>>>>> responses. >>>>>> >>>>>> http://plugins.svn.locusfoc.us/browser/trunk/ >>>>>> facebooker_extensions/init.rb >>>>>> >>>>>> If someone figures out the routing problems let me know I am >>>>>> eager to tie it back into my app. >>>>>> >>>>>> Later, >>>>>> Mark >>>>>> _______________________________________________ >>>>>> 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 >>> >>> >>> >> > > -- > Mike Mangino > http://www.elevatedrails.com > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/facebooker-talk/attachments/20071206/181ab286/attachment-0001.html
Can you try the latest version of facebooker? It should be fixed for all of the asset tags now. Mike On Dec 6, 2007, at 10:16 AM, Heavy Sixer wrote:> Hi Mike, > Sure thing here is how you can recreate it: > > 1. Create a stub application > MOS6507:~/Desktop markdaggett$ rails facebooker_test > > 2. Install the plugin > MOS6507:~/Desktop/facebooker_test markdaggett$ ruby script/plugin > install http://facebooker.rubyforge.org/svn/trunk/facebooker/ > > 3. Create a default resource > MOS6507:~/Desktop/facebooker_test markdaggett$ ruby script/generate > resource users > > 4. Add the environment params > ENV[''FACEBOOKER_RELATIVE_URL_ROOT''] = ''canvas_path'' > ENV[''FACEBOOK_API_KEY''] = ''123456'' > ENV[''FACEBOOK_SECRET_KEY''] = ''654321'' > > 5. Create a default application.rhtml layout > > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> > > <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> > <head> > <meta http-equiv="content-type" content="text/html;charset=UTF-8" /> > <title></title> > <%= javascript_include_tag :defaults -%> > </head> > <body> > <div id="wrap"> > <%= yield %> > </div> > </body> > </html> > > 6. Start the server and navigate to the url in question: > http://localhost:3000/users > > it will produce incorrect relative paths for the layout: > <script src="/canvas_path/javascripts/prototype.js?1196956262" > type="text/javascript"></script> > > In contrast to what I claimed earlier that the link_tos and urls_for > were being overridden it appears that the only problem I am actually > having is with the scripts being looked for in the wrong place, so > it may not be a routing issue per-say. > > Let me know if that is helpful at all or if I am just > misunderstanding how to use the plugin. > Best, > Mark > > On Dec 6, 2007, at 9:37 AM, Mike Mangino wrote: > >> Can you give me an example of where the wrong link is generated? >> I''d really like to get some test cases added and get this fixed. >> >> Mike >> >> On Dec 5, 2007, at 6:00 PM, Heavy Sixer wrote: >> >>> Hi Mike I am installing this as a plugin. >>> >>> On Dec 5, 2007, at 5:34 PM, Mike Mangino wrote: >>> >>>> Are you installing facebooker as a plugin or as a gem? >>>> >>>> This should just work if you install it as a plugin. If it >>>> doesn''t, it''s a bug I need to fix. >>>> >>>> Mike >>>> >>>> On Dec 5, 2007, at 4:17 PM, Heavy Sixer wrote: >>>> >>>>> Hey Mike, >>>>> Thanks for the reply, here is what I can tell you about my >>>>> experience with the routing issues so far: >>>>> >>>>> 1. I am trying to deploy a facebook app inside an existing >>>>> application, whereby my facebook app is only accessed from one >>>>> controller and the rest of the app behaves as normal. >>>>> >>>>> 2. I am running rails 1.2.3 and when the plugin is installed and >>>>> I run the plugin out of the box it overwrites all of my relative >>>>> paths for my rails application not just the controller i want to >>>>> use as my facebook controller. For example, all my CSS and >>>>> Javascript URLS are prepended with the facebooker relative url >>>>> root in my example it is: >>>>> >>>>> ENV[''FACEBOOKER_RELATIVE_URL_ROOT''] = ''facebook_accounts'' >>>>> >>>>> >>>>> which produces urls like this: >>>>> >>>>> <script src="http://localhost:3000/facebook_accounts/javascripts/prototype.js?1196361503 >>>>> " type="text/javascript"></script> >>>>> >>>>> which I of-course do not want :-) >>>>> >>>>> This may be happening because I do not completely understand how >>>>> I "should" be using this plugin. If you see anything amiss in my >>>>> approach let me know! >>>>> >>>>> Later, >>>>> Mark >>>>> >>>>> >>>>> >>>>> On Dec 5, 2007, at 12:29 PM, Mike Mangino wrote: >>>>> >>>>>> Can you give us a little more information about the >>>>>> url_rewriter breakage? Canvas urls should now link to canvas >>>>>> urls, and non-canvas urls should no longer include the canvas >>>>>> path. You use the :canvas=>true or :canvas=>false to override >>>>>> this behavior. >>>>>> >>>>>> Mike >>>>>> >>>>>> On Dec 4, 2007, at 3:48 PM, Heavy Sixer wrote: >>>>>> >>>>>>> Hi guys, >>>>>>> I am new to this list and thought i''d say hello. I am using >>>>>>> facebooker on a new project and so far I am really pleased >>>>>>> with it. I saw that some users are having woes with the >>>>>>> url_rewriter breaking urls for paths outside of the facebook >>>>>>> canvas (i.e. your site supports both facebook and non-facebook >>>>>>> users). I don''t have a prefect answer for this but I wrote a >>>>>>> plugin called facebooker_extensions which essentially reverts >>>>>>> this change until I figure out a way to smartly format the url >>>>>>> from either a facebook or nonfacebook request. >>>>>>> >>>>>>> I also started to extend the test_helper with more example xml >>>>>>> responses. >>>>>>> >>>>>>> http://plugins.svn.locusfoc.us/browser/trunk/facebooker_extensions/init.rb >>>>>>> >>>>>>> If someone figures out the routing problems let me know I am >>>>>>> eager to tie it back into my app. >>>>>>> >>>>>>> Later, >>>>>>> Mark >>>>>>> _______________________________________________ >>>>>>> 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 >>>> >>>> >>>> >>> >> >> -- >> Mike Mangino >> http://www.elevatedrails.com >> >> >> >-- Mike Mangino http://www.elevatedrails.com