From heavysixer at gmail.com Tue Dec 4 16:48:46 2007 From: heavysixer at gmail.com (Heavy Sixer) Date: Tue, 4 Dec 2007 15:48:46 -0600 Subject: [Facebooker-talk] new facebooker Message-ID: <4FC37B0E-10C3-496A-9692-FA5FB079B981@gmail.com> 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 From kamal at ror.com.my Wed Dec 5 10:18:43 2007 From: kamal at ror.com.my (Kamal Fariz) Date: Wed, 5 Dec 2007 23:18:43 +0800 Subject: [Facebooker-talk] Better RESTful routes with fb_sig_request_method Message-ID: With the new fb_sig_request_method provided by Facebook, I've patched shanev's pseudo-resource routes to generate restful routes, minus some exceptions. The announcement: http://www.facebook.com/developers/message.php#msg_126 Patch is submitted here: http://rubyforge.org/tracker/index.php?func=detail&aid=16105&group_id=4187&atid=16132 Blog entry about it: http://blog.ror.com.my/2007/12/05/fb-sig-request-method-and-rails-differentiate-get-and-post/ Regards, Kamal From heavysixer at gmail.com Wed Dec 5 10:38:50 2007 From: heavysixer at gmail.com (Heavy Sixer) Date: Wed, 5 Dec 2007 09:38:50 -0600 Subject: [Facebooker-talk] Better RESTful routes with fb_sig_request_method In-Reply-To: References: Message-ID: Very Interesting. I was not able to get the facebook_resources :model_name to work at all in my app. When i try and include it in my config/routes.rb file I get: ./script/../config/../config/routes.rb:67: undefined method `facebook_resources' for main:Object (NoMethodError) from /opt/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/ action_controller/routing.rb:1139:in `draw' from ./script/../config/../config/routes.rb:1 from /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/ lib/active_support/dependencies.rb:488:in `load' from /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/ lib/active_support/dependencies.rb:488:in `load' from /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/ lib/active_support/dependencies.rb:342:in `new_constants_in' from /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/ lib/active_support/dependencies.rb:488:in `load' from /opt/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/ action_controller/routing.rb:1165:in `load_routes!' from /opt/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/ action_controller/routing.rb:1157:in `reload' ... 31 levels... from /opt/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/ commands/server.rb:39 from /opt/local/lib/ruby/site_ruby/1.8/rubygems/ custom_require.rb:27:in `gem_original_require' from /opt/local/lib/ruby/site_ruby/1.8/rubygems/ custom_require.rb:27:in `require' from script/server:3 Yet the rest of the plugin works just fine. Did you have to do anything special to get it to work? I am on rails 1.2.3 btw. Later, Mark On Dec 5, 2007, at 9:18 AM, Kamal Fariz wrote: > With the new fb_sig_request_method provided by Facebook, I've patched > shanev's pseudo-resource routes to generate restful routes, minus some > exceptions. > > The announcement: http://www.facebook.com/developers/ > message.php#msg_126 > > Patch is submitted here: http://rubyforge.org/tracker/index.php? > func=detail&aid=16105&group_id=4187&atid=16132 > > Blog entry about it: http://blog.ror.com.my/2007/12/05/fb-sig- > request-method-and-rails-differentiate-get-and-post/ > > > > Regards, > Kamal > > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk From chad at chadfowler.com Wed Dec 5 11:34:23 2007 From: chad at chadfowler.com (Chad Fowler) Date: Wed, 5 Dec 2007 09:34:23 -0700 Subject: [Facebooker-talk] Better RESTful routes with fb_sig_request_method In-Reply-To: References: Message-ID: On 12/5/07, Kamal Fariz wrote: > > With the new fb_sig_request_method provided by Facebook, I've patched > shanev's pseudo-resource routes to generate restful routes, minus some > exceptions. > > The announcement: http://www.facebook.com/developers/message.php#msg_126 > > Patch is submitted here: > http://rubyforge.org/tracker/index.php?func=detail&aid=16105&group_id=4187&atid=16132 > > Blog entry about it: > http://blog.ror.com.my/2007/12/05/fb-sig-request-method-and-rails-differentiate-get-and-post/ > > Hi Kamal. This looks really cool! I haven't been too active on the project in the past couple of months, because my Facebook development has cooled down for a while with other priorities. But I like the way this looks. I'd like to leave it to others who are more actively working with Facebooker to decide on whether to apply. One thing I would like, though, is if you could create some tests for this. One of my goals with Facebooker was for it to remain thoroughly covered by automated tests. I'd prefer not to accept any patches that aren't well tested. Thanks! Chad -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/facebooker-talk/attachments/20071205/84a6eebd/attachment.html From mmangino at elevatedrails.com Wed Dec 5 13:28:26 2007 From: mmangino at elevatedrails.com (Mike Mangino) Date: Wed, 5 Dec 2007 12:28:26 -0600 Subject: [Facebooker-talk] Better RESTful routes with fb_sig_request_method In-Reply-To: References: Message-ID: <5F813826-76D9-4CCE-8DCB-268E7D5008CD@elevatedrails.com> I would expect that with this change we won't need the facebook_resource at all. We should be able to monkeypatch rails to use the fb_sig_request_method and fall back to the main method if that doesn't exist. I would be much happier with a patch that does this. My goal is to make Facebook development work exactly like non-facebook development. Mike On Dec 5, 2007, at 10:34 AM, Chad Fowler wrote: > > > On 12/5/07, Kamal Fariz wrote: With the new > fb_sig_request_method provided by Facebook, I've patched > shanev's pseudo-resource routes to generate restful routes, minus some > exceptions. > > The announcement: http://www.facebook.com/developers/message.php#msg_126 > > Patch is submitted here: http://rubyforge.org/tracker/index.php?func=detail&aid=16105&group_id=4187&atid=16132 > > Blog entry about it: http://blog.ror.com.my/2007/12/05/fb-sig-request-method-and-rails-differentiate-get-and-post/ > > > Hi Kamal. This looks really cool! > > I haven't been too active on the project in the past couple of > months, because my Facebook development has cooled down for a while > with other priorities. But I like the way this looks. I'd like to > leave it to others who are more actively working with Facebooker to > decide on whether to apply. One thing I would like, though, is if > you could create some tests for this. One of my goals with > Facebooker was for it to remain thoroughly covered by automated > tests. I'd prefer not to accept any patches that aren't well tested. > > Thanks! > Chad > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk -- Mike Mangino http://www.elevatedrails.com From mmangino at elevatedrails.com Wed Dec 5 13:29:41 2007 From: mmangino at elevatedrails.com (Mike Mangino) Date: Wed, 5 Dec 2007 12:29:41 -0600 Subject: [Facebooker-talk] new facebooker In-Reply-To: <4FC37B0E-10C3-496A-9692-FA5FB079B981@gmail.com> References: <4FC37B0E-10C3-496A-9692-FA5FB079B981@gmail.com> Message-ID: 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 From heavysixer at gmail.com Wed Dec 5 17:17:21 2007 From: heavysixer at gmail.com (Heavy Sixer) Date: Wed, 5 Dec 2007 16:17:21 -0600 Subject: [Facebooker-talk] new facebooker In-Reply-To: References: <4FC37B0E-10C3-496A-9692-FA5FB079B981@gmail.com> Message-ID: <40B899C0-0B47-4642-AFAE-B541954E9ADA@gmail.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: 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 From shanev at gmail.com Wed Dec 5 17:43:44 2007 From: shanev at gmail.com (Shane Vitarana) Date: Wed, 5 Dec 2007 16:43:44 -0600 Subject: [Facebooker-talk] Better RESTful routes with fb_sig_request_method In-Reply-To: References: Message-ID: <4ab757a40712051443i37abad31s16aad6902a6ff19c@mail.gmail.com> Mark- Are you running init.rb which hooks the facebook routing mapper extensions into routes? It looks like that is your problem. What I do is put facebooker vendor/plugins. This way, Rails thinks its a plugin and runs init.rb. Shane On 12/5/07, Heavy Sixer wrote: > Very Interesting. > I was not able to get the facebook_resources :model_name to work at > all in my app. When i try and include it in my config/routes.rb file > I get: > > ./script/../config/../config/routes.rb:67: undefined method > `facebook_resources' for main:Object (NoMethodError) > from /opt/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/ > action_controller/routing.rb:1139:in `draw' > from ./script/../config/../config/routes.rb:1 > from /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/ > lib/active_support/dependencies.rb:488:in `load' > from /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/ > lib/active_support/dependencies.rb:488:in `load' > from /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/ > lib/active_support/dependencies.rb:342:in `new_constants_in' > from /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/ > lib/active_support/dependencies.rb:488:in `load' > from /opt/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/ > action_controller/routing.rb:1165:in `load_routes!' > from /opt/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/ > action_controller/routing.rb:1157:in `reload' > ... 31 levels... > from /opt/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/ > commands/server.rb:39 > from /opt/local/lib/ruby/site_ruby/1.8/rubygems/ > custom_require.rb:27:in `gem_original_require' > from /opt/local/lib/ruby/site_ruby/1.8/rubygems/ > custom_require.rb:27:in `require' > from script/server:3 > > > Yet the rest of the plugin works just fine. Did you have to do > anything special to get it to work? I am on rails 1.2.3 btw. > Later, > Mark > On Dec 5, 2007, at 9:18 AM, Kamal Fariz wrote: > > > With the new fb_sig_request_method provided by Facebook, I've patched > > shanev's pseudo-resource routes to generate restful routes, minus some > > exceptions. > > > > The announcement: http://www.facebook.com/developers/ > > message.php#msg_126 > > > > Patch is submitted here: http://rubyforge.org/tracker/index.php? > > func=detail&aid=16105&group_id=4187&atid=16132 > > > > Blog entry about it: http://blog.ror.com.my/2007/12/05/fb-sig- > > request-method-and-rails-differentiate-get-and-post/ > > > > > > > > Regards, > > Kamal > > > > _______________________________________________ > > 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 > -- http://myfitbuddy.com | http://shanesbrain.net | http://crimsonjet.com From shanev at gmail.com Wed Dec 5 17:51:31 2007 From: shanev at gmail.com (Shane Vitarana) Date: Wed, 5 Dec 2007 16:51:31 -0600 Subject: [Facebooker-talk] Better RESTful routes with fb_sig_request_method In-Reply-To: <5F813826-76D9-4CCE-8DCB-268E7D5008CD@elevatedrails.com> References: <5F813826-76D9-4CCE-8DCB-268E7D5008CD@elevatedrails.com> Message-ID: <4ab757a40712051451h445203bew229cb3002a894d64@mail.gmail.com> > I would be much happier with a patch that does this. My goal is to > make Facebook development work exactly like non-facebook development. > It is definitely a cool idea to make Facebook development work exactly like vanilla restful Rails, but think about the case where you are adding Facebook support to an existing app. If you patch resource routing to be dependent on fb_sig_request or change the resource mapper, then routes will break for the non-Facebook portion of the app. This also applies for redirect_to. Shane -- http://myfitbuddy.com | http://shanesbrain.net | http://crimsonjet.com From mmangino at elevatedrails.com Wed Dec 5 18:34:25 2007 From: mmangino at elevatedrails.com (Mike Mangino) Date: Wed, 5 Dec 2007 17:34:25 -0600 Subject: [Facebooker-talk] new facebooker In-Reply-To: <40B899C0-0B47-4642-AFAE-B541954E9ADA@gmail.com> References: <4FC37B0E-10C3-496A-9692-FA5FB079B981@gmail.com> <40B899C0-0B47-4642-AFAE-B541954E9ADA@gmail.com> Message-ID: 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: > > > > 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 From mmangino at elevatedrails.com Wed Dec 5 18:35:31 2007 From: mmangino at elevatedrails.com (Mike Mangino) Date: Wed, 5 Dec 2007 17:35:31 -0600 Subject: [Facebooker-talk] Better RESTful routes with fb_sig_request_method In-Reply-To: <4ab757a40712051451h445203bew229cb3002a894d64@mail.gmail.com> References: <5F813826-76D9-4CCE-8DCB-268E7D5008CD@elevatedrails.com> <4ab757a40712051451h445203bew229cb3002a894d64@mail.gmail.com> Message-ID: We do this already in a bunch of places, we just need to fallback. If fb_sig_request_method isn't there, we fall back to the old handling. This is what we do for redirect_to, if the fb_sig_in_canvas parameter is there, we use an fb:redirect. Otherwise, we issue a real redirect. Mike On Dec 5, 2007, at 4:51 PM, Shane Vitarana wrote: >> I would be much happier with a patch that does this. My goal is to >> make Facebook development work exactly like non-facebook development. >> > > It is definitely a cool idea to make Facebook development work exactly > like vanilla restful Rails, but think about the case where you are > adding Facebook support to an existing app. If you patch resource > routing to be dependent on fb_sig_request or change the resource > mapper, then routes will break for the non-Facebook portion of the > app. > > This also applies for redirect_to. > > Shane > -- > http://myfitbuddy.com | http://shanesbrain.net | http://crimsonjet.com -- Mike Mangino http://www.elevatedrails.com From shanev at gmail.com Wed Dec 5 19:03:10 2007 From: shanev at gmail.com (Shane Vitarana) Date: Wed, 5 Dec 2007 18:03:10 -0600 Subject: [Facebooker-talk] Better RESTful routes with fb_sig_request_method In-Reply-To: References: <5F813826-76D9-4CCE-8DCB-268E7D5008CD@elevatedrails.com> <4ab757a40712051451h445203bew229cb3002a894d64@mail.gmail.com> Message-ID: <4ab757a40712051603n42eada79r54a7ec95a3b9c967@mail.gmail.com> I do recall redirect_to having a fallback. So doing the same for routes would be perfect. On 12/5/07, Mike Mangino wrote: > We do this already in a bunch of places, we just need to fallback. If > fb_sig_request_method isn't there, we fall back to the old handling. > > This is what we do for redirect_to, if the fb_sig_in_canvas parameter > is there, we use an fb:redirect. Otherwise, we issue a real redirect. > > Mike > > On Dec 5, 2007, at 4:51 PM, Shane Vitarana wrote: > > >> I would be much happier with a patch that does this. My goal is to > >> make Facebook development work exactly like non-facebook development. > >> > > > > It is definitely a cool idea to make Facebook development work exactly > > like vanilla restful Rails, but think about the case where you are > > adding Facebook support to an existing app. If you patch resource > > routing to be dependent on fb_sig_request or change the resource > > mapper, then routes will break for the non-Facebook portion of the > > app. > > > > This also applies for redirect_to. > > > > Shane > > -- > > http://myfitbuddy.com | http://shanesbrain.net | http://crimsonjet.com > > -- > Mike Mangino > http://www.elevatedrails.com > > > > -- http://myfitbuddy.com | http://shanesbrain.net | http://crimsonjet.com From heavysixer at gmail.com Thu Dec 6 11:16:59 2007 From: heavysixer at gmail.com (Heavy Sixer) Date: Thu, 6 Dec 2007 10:16:59 -0600 Subject: [Facebooker-talk] new facebooker In-Reply-To: <48DF5EE4-3965-4429-91BE-90EAA3BD9D98@elevatedrails.com> References: <4FC37B0E-10C3-496A-9692-FA5FB079B981@gmail.com> <40B899C0-0B47-4642-AFAE-B541954E9ADA@gmail.com> <48DF5EE4-3965-4429-91BE-90EAA3BD9D98@elevatedrails.com> Message-ID: 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 <%= javascript_include_tag :defaults -%>
<%= yield %>
6. Start the server and navigate to the url in question: http://localhost:3000/users it will produce incorrect relative paths for the layout: 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: >>>> >>>> >>>> >>>> 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 From mmangino at elevatedrails.com Fri Dec 7 12:48:07 2007 From: mmangino at elevatedrails.com (Mike Mangino) Date: Fri, 7 Dec 2007 11:48:07 -0600 Subject: [Facebooker-talk] new facebooker In-Reply-To: References: <4FC37B0E-10C3-496A-9692-FA5FB079B981@gmail.com> <40B899C0-0B47-4642-AFAE-B541954E9ADA@gmail.com> <48DF5EE4-3965-4429-91BE-90EAA3BD9D98@elevatedrails.com> Message-ID: <810125D7-DF77-4620-8A3E-3E5D2C25E4A1@elevatedrails.com> 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 > > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> > > > > > > <%= javascript_include_tag :defaults -%> > > >
> <%= yield %> >
> > > > 6. Start the server and navigate to the url in question: > http://localhost:3000/users > > it will produce incorrect relative paths for the layout: > > > 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: >>>>> >>>>> >>>>> >>>>> 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 From dkanderson at gmail.com Sat Dec 8 13:51:48 2007 From: dkanderson at gmail.com (Dustin Anderson) Date: Sat, 8 Dec 2007 12:51:48 -0600 Subject: [Facebooker-talk] Uploading photos using facebook & attachment_fu Message-ID: Hi All, I'm trying to use a form to upload a photo that I will save using attachment_fu. I'm very new to Facebookr so I apologize if this is covered somewhere, but I'm kind of stumped. Here's what I'm doing now: <% facebook_form_for(:my_object, :url => { :action => 'upload_photo', :id => params[:id] }, :html => { :multipart => true }) do |f| -%> <%= radio_button_tag 'my_object[my_param]', "value" %> <%= file_field_tag "photo[uploaded_data]" %> <% end %> Now that I've typed this out I'm realizing that the facebook_form_for probably isn't doing anything for me since i'm not using the f. helpers, but I have two models that I'm trying to save data for.nonetheless, here's my problem: The params are passing "photo"=>{"uploaded_data"=>"sample.jpg"} and the error that I'm getting is: NoMethodError (undefined method `content_type' for "sample.jpg":String) Again, I'm using attachment_fu to handle the image processing. It was working before I tried porting it over to facebook so I think I have attachment_fu configured properly. Any ideas on what I'm missing? Many thanks, Dustin -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/facebooker-talk/attachments/20071208/6a917d1b/attachment.html From mmangino at elevatedrails.com Sat Dec 8 19:20:17 2007 From: mmangino at elevatedrails.com (Mike Mangino) Date: Sat, 8 Dec 2007 18:20:17 -0600 Subject: [Facebooker-talk] Uploading photos using facebook & attachment_fu In-Reply-To: References: Message-ID: Facebook doesn't pass through multipart uploads. You can add a :canvas=>true to your route to bypass Facebook on the form POST and then redirect after the upload. You will probably need to include the fb_sig parameters in your form. Mike On Dec 8, 2007, at 12:51 PM, Dustin Anderson wrote: > Hi All, > > I'm trying to use a form to upload a photo that I will save using > attachment_fu. I'm very new to Facebookr so I apologize if this is > covered somewhere, but I'm kind of stumped. > > Here's what I'm doing now: > <% facebook_form_for(:my_object, :url => { :action => > 'upload_photo', :id => params[:id] }, :html => { :multipart => > true }) do |f| -%> > > <%= radio_button_tag 'my_object[my_param]', "value" %> > > <%= file_field_tag "photo[uploaded_data]" %> > > <% end %> > > Now that I've typed this out I'm realizing that the > facebook_form_for probably isn't doing anything for me since i'm not > using the f. helpers, but I have two models that I'm trying to save > data for.nonetheless, here's my problem: > > The params are passing "photo"=>{"uploaded_data"=>"sample.jpg"} and > the error that I'm getting is: > NoMethodError (undefined method `content_type' for > "sample.jpg":String) > > Again, I'm using attachment_fu to handle the image processing. It > was working before I tried porting it over to facebook so I think I > have attachment_fu configured properly. > > Any ideas on what I'm missing? > > Many thanks, > Dustin > > > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk -- Mike Mangino http://www.elevatedrails.com From dkanderson at gmail.com Sun Dec 9 01:19:53 2007 From: dkanderson at gmail.com (Dustin Anderson) Date: Sun, 9 Dec 2007 00:19:53 -0600 Subject: [Facebooker-talk] Uploading photos using facebook & attachment_fu In-Reply-To: References: Message-ID: Awesome, thanks Mike - that was a huge help. Now the file is saving to the database and I have it redirecting. I have to say that the way I have it working seems like it's really hack-ey. Here's basically what my CONTROLLER CODE looks like: ####Controller:### def create @my_object = MyObject.new @my_object.photo = Photo.new(params[:photo]) @my_object.photo.save if @comparison.save #### AND THIS IS WHERE IT GETS WEIRD- DO I REALLY HAVE TO PASS ALL THESE PARAMS ALONG?### redirect_to :action => "get_other_pic", :fb_sig => params[:fb_sig], :fb_sig_time => params[:fb_sig_time], :fb_sig_session_key => params[:fb_sig_session_key], :fb_sig_expires => params[:fb_sig_expires], :fb_sig_added => params[:fb_sig_added], :fb_sig_api_key => params[:fb_sig_api_key], :fb_sig_user => params[:fb_sig_user], :fb_sig_profile_update_time => params[:fb_sig_profile_update_time], :id => @my_object.id, :canvas => true else render :action => :new end end ###END CONTROLLER### Oh, and here's basically what MY VIEW LOOKS LIKE: #FYI, :canvas => false worked for me, not :canvas => true - maybe I misunderstood? <% form_for(:comparison, :url => { :controller => 'my_object', :action => 'update', :canvas => false, :only_path => false, :host => "www.myhost.com" }, :html => { :multipart => true }) do |f| -%> Thanks again, I was really wondering if I was barking up the wrong tree... and I wasn't getting anywhere for a while. And now, my only question is - am I missing something? It seems like passing all these fb_sig_* parameters isn't very DRY and Facebookr might have some abstraction for it? -Dustin On Dec 8, 2007 6:20 PM, Mike Mangino wrote: > Facebook doesn't pass through multipart uploads. You can add > a :canvas=>true to your route to bypass Facebook on the form POST and > then redirect after the upload. You will probably need to include the > fb_sig parameters in your form. > > Mike > > > On Dec 8, 2007, at 12:51 PM, Dustin Anderson wrote: > > > Hi All, > > > > I'm trying to use a form to upload a photo that I will save using > > attachment_fu. I'm very new to Facebookr so I apologize if this is > > covered somewhere, but I'm kind of stumped. > > > > Here's what I'm doing now: > > <% facebook_form_for(:my_object, :url => { :action => > > 'upload_photo', :id => params[:id] }, :html => { :multipart => > > true }) do |f| -%> > > > > <%= radio_button_tag 'my_object[my_param]', "value" %> > > > > <%= file_field_tag "photo[uploaded_data]" %> > > > > <% end %> > > > > Now that I've typed this out I'm realizing that the > > facebook_form_for probably isn't doing anything for me since i'm not > > using the f. helpers, but I have two models that I'm trying to save > > data for.nonetheless, here's my problem: > > > > The params are passing "photo"=>{"uploaded_data"=>"sample.jpg"} and > > the error that I'm getting is: > > NoMethodError (undefined method `content_type' for > > "sample.jpg":String) > > > > Again, I'm using attachment_fu to handle the image processing. It > > was working before I tried porting it over to facebook so I think I > > have attachment_fu configured properly. > > > > Any ideas on what I'm missing? > > > > Many thanks, > > Dustin > > > > > > _______________________________________________ > > Facebooker-talk mailing list > > Facebooker-talk at rubyforge.org > > http://rubyforge.org/mailman/listinfo/facebooker-talk > > -- > Mike Mangino > http://www.elevatedrails.com > > From dkanderson at gmail.com Sun Dec 9 15:20:42 2007 From: dkanderson at gmail.com (Dustin Anderson) Date: Sun, 9 Dec 2007 14:20:42 -0600 Subject: [Facebooker-talk] Uploading photos using facebook & attachment_fu In-Reply-To: References: Message-ID: Ahh, so it turns out I didn't need any of the fb_sig stuff at all - I just needed to tell it canvas => false on the file upload (in the form) and then canvas => true in the redirect (in the controller)- again, thanks Mike. Slowly but surely, I'm starting to get this... Now, here's another quirk - there seems to be a problem with the rails image_tag helper not working with the location of my file uploads... this may be just a problem with how attachment_fu saves attachments, and facebook's requirement to have the relative_url_root. I have attachment_fu putting the model attachments in public/system/photos In the view, when I call <%= image_tag @my_model.photo.public_filename %>, it renders http://www.myhost.com/my_facebook_app/system/photos/0000/0083/uploaded_image.jpg But, the file isn't there, the file is in: http://www.myhost.com/system/photos/0000/0083/uploaded_image.jpg It's the same path without the FACEBOOKER_RELATIVE_URL_ROOT, which for me is: ENV['FACEBOOKER_RELATIVE_URL_ROOT'] = 'my_facebook_app' Anyway, I had to make a helper to sub out the /my_facebook_app/ of the path. It seems like image_tag should just work since facebook_image_tag says its deprecated... but there seems to be a quirk if you are using something like attachment_fu which doesn't use ENV['FACEBOOKER_RELATIVE_URL_ROOT']. If anyone has any knowledge of what's happening here, I'd love to get some advice or help... for now, I'm just going to stick with my helper which seems to be working. Thanks again, Dustin On Dec 9, 2007 12:19 AM, Dustin Anderson wrote: > Awesome, thanks Mike - that was a huge help. Now the file is saving > to the database and I have it redirecting. I have to say that the way > I have it working seems like it's really hack-ey. > > Here's basically what my CONTROLLER CODE looks like: > ####Controller:### > def create > @my_object = MyObject.new > @my_object.photo = Photo.new(params[:photo]) > @my_object.photo.save > if @comparison.save > #### AND THIS IS WHERE IT GETS WEIRD- DO I REALLY HAVE TO PASS ALL > THESE PARAMS ALONG?### > redirect_to :action => "get_other_pic", > :fb_sig => params[:fb_sig], > :fb_sig_time => params[:fb_sig_time], > :fb_sig_session_key => params[:fb_sig_session_key], > :fb_sig_expires => params[:fb_sig_expires], > :fb_sig_added => params[:fb_sig_added], > :fb_sig_api_key => params[:fb_sig_api_key], > :fb_sig_user => params[:fb_sig_user], > :fb_sig_profile_update_time => params[:fb_sig_profile_update_time], > :id => @my_object.id, > :canvas => true > else > render :action => :new > end > end > ###END CONTROLLER### > Oh, and here's basically what MY VIEW LOOKS LIKE: > #FYI, :canvas => false worked for me, not :canvas => true - maybe I > misunderstood? > > <% form_for(:comparison, > :url => { :controller => 'my_object', :action => 'update', :canvas => > false, :only_path => false, :host => "www.myhost.com" }, > :html => { :multipart => true }) do |f| -%> > > Thanks again, I was really wondering if I was barking up the wrong > tree... and I wasn't getting anywhere for a while. And now, my only > question is - am I missing something? It seems like passing all these > fb_sig_* parameters isn't very DRY and Facebookr might have some > abstraction for it? > > -Dustin > > > On Dec 8, 2007 6:20 PM, Mike Mangino wrote: > > Facebook doesn't pass through multipart uploads. You can add > > a :canvas=>true to your route to bypass Facebook on the form POST and > > then redirect after the upload. You will probably need to include the > > fb_sig parameters in your form. > > > > Mike > > > > > > On Dec 8, 2007, at 12:51 PM, Dustin Anderson wrote: > > > > > Hi All, > > > > > > I'm trying to use a form to upload a photo that I will save using > > > attachment_fu. I'm very new to Facebookr so I apologize if this is > > > covered somewhere, but I'm kind of stumped. > > > > > > Here's what I'm doing now: > > > <% facebook_form_for(:my_object, :url => { :action => > > > 'upload_photo', :id => params[:id] }, :html => { :multipart => > > > true }) do |f| -%> > > > > > > <%= radio_button_tag 'my_object[my_param]', "value" %> > > > > > > <%= file_field_tag "photo[uploaded_data]" %> > > > > > > <% end %> > > > > > > Now that I've typed this out I'm realizing that the > > > facebook_form_for probably isn't doing anything for me since i'm not > > > using the f. helpers, but I have two models that I'm trying to save > > > data for.nonetheless, here's my problem: > > > > > > The params are passing "photo"=>{"uploaded_data"=>"sample.jpg"} and > > > the error that I'm getting is: > > > NoMethodError (undefined method `content_type' for > > > "sample.jpg":String) > > > > > > Again, I'm using attachment_fu to handle the image processing. It > > > was working before I tried porting it over to facebook so I think I > > > have attachment_fu configured properly. > > > > > > Any ideas on what I'm missing? > > > > > > Many thanks, > > > Dustin > > > > > > > > > _______________________________________________ > > > Facebooker-talk mailing list > > > Facebooker-talk at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/facebooker-talk > > > > -- > > Mike Mangino > > http://www.elevatedrails.com > > > > > From heavysixer at gmail.com Mon Dec 10 13:35:45 2007 From: heavysixer at gmail.com (Heavy Sixer) Date: Mon, 10 Dec 2007 12:35:45 -0600 Subject: [Facebooker-talk] facebook_resources method not found Message-ID: <909F6C22-3E94-4BF1-866B-98446D85A564@gmail.com> Is anyone else getting this error in their routes, when running Facebooker from a plugin. ./script/../config/../config/routes.rb:67: undefined method `facebook_resources' for main:Object (NoMethodError) from /opt/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/ action_controller/routing.rb:1139:in `draw' from ./script/../config/../config/routes.rb:1 from /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/ lib/active_support/dependencies.rb:488:in `load' from /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/ lib/active_support/dependencies.rb:488:in `load' from /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/ lib/active_support/dependencies.rb:342:in `new_constants_in' from /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/ lib/active_support/dependencies.rb:488:in `load' from /opt/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/ action_controller/routing.rb:1165:in `load_routes!' from /opt/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/ action_controller/routing.rb:1157:in `reload' ... 31 levels... from /opt/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/ commands/server.rb:39 from /opt/local/lib/ruby/site_ruby/1.8/rubygems/ custom_require.rb:27:in `gem_original_require' from /opt/local/lib/ruby/site_ruby/1.8/rubygems/ custom_require.rb:27:in `require' from script/server:3 From heavysixer at gmail.com Mon Dec 10 15:47:37 2007 From: heavysixer at gmail.com (Heavy Sixer) Date: Mon, 10 Dec 2007 14:47:37 -0600 Subject: [Facebooker-talk] facebooker irc Message-ID: Hey list, I started a #facebooker channel on freenode.net for those wanting to work on the plugin or help each other out in a more real-time fashion. Later, Mark From heavysixer at gmail.com Mon Dec 10 16:23:15 2007 From: heavysixer at gmail.com (Heavy Sixer) Date: Mon, 10 Dec 2007 15:23:15 -0600 Subject: [Facebooker-talk] facebook_resources method not found In-Reply-To: <909F6C22-3E94-4BF1-866B-98446D85A564@gmail.com> References: <909F6C22-3E94-4BF1-866B-98446D85A564@gmail.com> Message-ID: <1878600D-811D-414E-8725-8D6A622D572A@gmail.com> Here is a brief followup to this post. I now know why this was occurring. It was non-obvious to me from looking at the comments in the source-code that you needed to append "map" to the front of the "facebook_resources" method. Everything worked great, once i rewrote me route to match this format: map.facebook_resources My suggestion would be to add "map." to the source comment to the routing.rb file inside facebooker/lib/facebooker/rails/ Best, Mark On Dec 10, 2007, at 12:35 PM, Heavy Sixer wrote: > Is anyone else getting this error in their routes, when running > Facebooker from a plugin. > > ./script/../config/../config/routes.rb:67: undefined method > `facebook_resources' for main:Object (NoMethodError) > from /opt/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/ > lib/action_controller/routing.rb:1139:in `draw' > from ./script/../config/../config/routes.rb:1 > from /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/ > lib/active_support/dependencies.rb:488:in `load' > from /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/ > lib/active_support/dependencies.rb:488:in `load' > from /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/ > lib/active_support/dependencies.rb:342:in `new_constants_in' > from /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/ > lib/active_support/dependencies.rb:488:in `load' > from /opt/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/ > lib/action_controller/routing.rb:1165:in `load_routes!' > from /opt/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/ > lib/action_controller/routing.rb:1157:in `reload' > ... 31 levels... > from /opt/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/ > commands/server.rb:39 > from /opt/local/lib/ruby/site_ruby/1.8/rubygems/ > custom_require.rb:27:in `gem_original_require' > from /opt/local/lib/ruby/site_ruby/1.8/rubygems/ > custom_require.rb:27:in `require' > from script/server:3 > From mmangino at elevatedrails.com Mon Dec 10 19:32:02 2007 From: mmangino at elevatedrails.com (Mike Mangino) Date: Mon, 10 Dec 2007 18:32:02 -0600 Subject: [Facebooker-talk] facebook_resources method not found In-Reply-To: <1878600D-811D-414E-8725-8D6A622D572A@gmail.com> References: <909F6C22-3E94-4BF1-866B-98446D85A564@gmail.com> <1878600D-811D-414E-8725-8D6A622D572A@gmail.com> Message-ID: <2182C554-1789-4D23-AA13-2BF2DC359EAA@elevatedrails.com> I'm hopefully going to make the facebook_resources method unnecessary tomorrow. I think we'll be able to use regular resources shortly. Mike On Dec 10, 2007, at 3:23 PM, Heavy Sixer wrote: > Here is a brief followup to this post. I now know why this was > occurring. It was non-obvious to me from looking at the comments in > the source-code that you needed to append "map" to the front of the > "facebook_resources" method. > > Everything worked great, once i rewrote me route to match this format: > map.facebook_resources > > My suggestion would be to add "map." to the source comment to the > routing.rb file inside facebooker/lib/facebooker/rails/ > > Best, > Mark > > > > On Dec 10, 2007, at 12:35 PM, Heavy Sixer wrote: > >> Is anyone else getting this error in their routes, when running >> Facebooker from a plugin. >> >> ./script/../config/../config/routes.rb:67: undefined method >> `facebook_resources' for main:Object (NoMethodError) >> from /opt/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/ >> lib/action_controller/routing.rb:1139:in `draw' >> from ./script/../config/../config/routes.rb:1 >> from /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/ >> lib/active_support/dependencies.rb:488:in `load' >> from /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/ >> lib/active_support/dependencies.rb:488:in `load' >> from /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/ >> lib/active_support/dependencies.rb:342:in `new_constants_in' >> from /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/ >> lib/active_support/dependencies.rb:488:in `load' >> from /opt/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/ >> lib/action_controller/routing.rb:1165:in `load_routes!' >> from /opt/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/ >> lib/action_controller/routing.rb:1157:in `reload' >> ... 31 levels... >> from /opt/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/ >> commands/server.rb:39 >> from /opt/local/lib/ruby/site_ruby/1.8/rubygems/ >> custom_require.rb:27:in `gem_original_require' >> from /opt/local/lib/ruby/site_ruby/1.8/rubygems/ >> custom_require.rb:27:in `require' >> from script/server:3 >> > > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk -- Mike Mangino http://www.elevatedrails.com From heavysixer at gmail.com Mon Dec 10 22:59:59 2007 From: heavysixer at gmail.com (Heavy Sixer) Date: Mon, 10 Dec 2007 21:59:59 -0600 Subject: [Facebooker-talk] facebook_resources method not found In-Reply-To: <2182C554-1789-4D23-AA13-2BF2DC359EAA@elevatedrails.com> References: <909F6C22-3E94-4BF1-866B-98446D85A564@gmail.com> <1878600D-811D-414E-8725-8D6A622D572A@gmail.com> <2182C554-1789-4D23-AA13-2BF2DC359EAA@elevatedrails.com> Message-ID: Mike, That would be awesome! I am having a bear of a time right now trying to get my regular rails app working with a dedicated facebook controller. Mike, when you were designing the routes portion of the plugin did you intend for the user to set their app's callback and canvas urls to the same name of the controller they specify for facebook actions? I am just a bit confused what goes where. Here is an example: I have a callback_url specified as: http://my_server.com/facebook_accounts I set my canvas page url http://apps.facebook.com/facebook_accounts Within my application I have this environment configuration: ENV['FACEBOOKER_RELATIVE_URL_ROOT'] = 'facebook_accounts' And these routes: map.facebook_resources :facebook_accounts This works out great for actions called by facebook like when a user adds or removes the app, everything works great. However, If I have a form on my site that I'd like the user to submit (outside of Facebook) the application starts to go screwy. Here is an example: I have a form, which posts to this action in my "facebook_accounts" controller Facebook correctly posts to the right url, my controller specifies that it is to redirect when complete, I do so like this in the controller: redirect_to :action => 'index' Yet, this produces a 404 error on the facebook side, because it is trying to resolve to: http://apps.facebook.com/facebook_accounts//facebook_accounts/index Do you have any idea what I am doing wrong with the way you've intended the rewrite rules to work? Any help is greatly appreciated. Thanks, Mark On Dec 10, 2007, at 6:32 PM, Mike Mangino wrote: > I'm hopefully going to make the facebook_resources method > unnecessary tomorrow. I think we'll be able to use regular > resources shortly. > > Mike > > On Dec 10, 2007, at 3:23 PM, Heavy Sixer wrote: > >> Here is a brief followup to this post. I now know why this was >> occurring. It was non-obvious to me from looking at the comments in >> the source-code that you needed to append "map" to the front of the >> "facebook_resources" method. >> >> Everything worked great, once i rewrote me route to match this >> format: >> map.facebook_resources >> >> My suggestion would be to add "map." to the source comment to the >> routing.rb file inside facebooker/lib/facebooker/rails/ >> >> Best, >> Mark >> >> >> >> On Dec 10, 2007, at 12:35 PM, Heavy Sixer wrote: >> >>> Is anyone else getting this error in their routes, when running >>> Facebooker from a plugin. >>> >>> ./script/../config/../config/routes.rb:67: undefined method >>> `facebook_resources' for main:Object (NoMethodError) >>> from /opt/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/ >>> lib/action_controller/routing.rb:1139:in `draw' >>> from ./script/../config/../config/routes.rb:1 >>> from /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/ >>> lib/active_support/dependencies.rb:488:in `load' >>> from /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/ >>> lib/active_support/dependencies.rb:488:in `load' >>> from /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/ >>> lib/active_support/dependencies.rb:342:in `new_constants_in' >>> from /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/ >>> lib/active_support/dependencies.rb:488:in `load' >>> from /opt/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/ >>> lib/action_controller/routing.rb:1165:in `load_routes!' >>> from /opt/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/ >>> lib/action_controller/routing.rb:1157:in `reload' >>> ... 31 levels... >>> from /opt/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/ >>> commands/server.rb:39 >>> from /opt/local/lib/ruby/site_ruby/1.8/rubygems/ >>> custom_require.rb:27:in `gem_original_require' >>> from /opt/local/lib/ruby/site_ruby/1.8/rubygems/ >>> custom_require.rb:27:in `require' >>> from script/server:3 >>> >> >> _______________________________________________ >> 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/20071210/10a2f649/attachment-0001.html From heavysixer at gmail.com Mon Dec 10 23:02:03 2007 From: heavysixer at gmail.com (Heavy Sixer) Date: Mon, 10 Dec 2007 22:02:03 -0600 Subject: [Facebooker-talk] facebook_resources method not found In-Reply-To: References: <909F6C22-3E94-4BF1-866B-98446D85A564@gmail.com> <1878600D-811D-414E-8725-8D6A622D572A@gmail.com> <2182C554-1789-4D23-AA13-2BF2DC359EAA@elevatedrails.com> Message-ID: <7DDE3BD9-F05A-4548-B639-40F318CED2F3@gmail.com> One more followup, the Error console on Facebook say: no route found to match "facebook_accounts/index" with {:method=>:post} but this should be handled by the dynamically created routes in the map.facebook_resouces command correct? On Dec 10, 2007, at 9:59 PM, Heavy Sixer wrote: > Mike, > That would be awesome! > I am having a bear of a time right now trying to get my regular > rails app working with a dedicated facebook controller. > > Mike, when you were designing the routes portion of the plugin did > you intend for the user to set their app's callback and canvas > urls to the same name of the controller they specify for facebook > actions? > > I am just a bit confused what goes where. Here is an example: > I have a callback_url specified as: > http://my_server.com/facebook_accounts > > I set my canvas page url > http://apps.facebook.com/facebook_accounts > > Within my application I have this environment configuration: > ENV['FACEBOOKER_RELATIVE_URL_ROOT'] = 'facebook_accounts' > > And these routes: > map.facebook_resources :facebook_accounts > > This works out great for actions called by facebook like when a > user adds or removes the app, everything works great. However, > If I have a form on my site that I'd like the user to submit > (outside of Facebook) the application starts to go screwy. Here is > an example: > I have a form, which posts to this action in my "facebook_accounts" > controller > > > Facebook correctly posts to the right url, my controller specifies > that it is to redirect when complete, I do so like this in the > controller: > redirect_to :action => 'index' > > Yet, this produces a 404 error on the facebook side, because it is > trying to resolve to: > http://apps.facebook.com/facebook_accounts//facebook_accounts/index > > Do you have any idea what I am doing wrong with the way you've > intended the rewrite rules to work? > > Any help is greatly appreciated. > > Thanks, > Mark > > On Dec 10, 2007, at 6:32 PM, Mike Mangino wrote: > >> I'm hopefully going to make the facebook_resources method >> unnecessary tomorrow. I think we'll be able to use regular >> resources shortly. >> >> Mike >> >> On Dec 10, 2007, at 3:23 PM, Heavy Sixer wrote: >> >>> Here is a brief followup to this post. I now know why this was >>> occurring. It was non-obvious to me from looking at the comments in >>> the source-code that you needed to append "map" to the front of the >>> "facebook_resources" method. >>> >>> Everything worked great, once i rewrote me route to match this >>> format: >>> map.facebook_resources >>> >>> My suggestion would be to add "map." to the source comment to the >>> routing.rb file inside facebooker/lib/facebooker/rails/ >>> >>> Best, >>> Mark >>> >>> >>> >>> On Dec 10, 2007, at 12:35 PM, Heavy Sixer wrote: >>> >>>> Is anyone else getting this error in their routes, when running >>>> Facebooker from a plugin. >>>> >>>> ./script/../config/../config/routes.rb:67: undefined method >>>> `facebook_resources' for main:Object (NoMethodError) >>>> from /opt/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/ >>>> lib/action_controller/routing.rb:1139:in `draw' >>>> from ./script/../config/../config/routes.rb:1 >>>> from /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/ >>>> lib/active_support/dependencies.rb:488:in `load' >>>> from /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/ >>>> lib/active_support/dependencies.rb:488:in `load' >>>> from /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/ >>>> lib/active_support/dependencies.rb:342:in `new_constants_in' >>>> from /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/ >>>> lib/active_support/dependencies.rb:488:in `load' >>>> from /opt/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/ >>>> lib/action_controller/routing.rb:1165:in `load_routes!' >>>> from /opt/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/ >>>> lib/action_controller/routing.rb:1157:in `reload' >>>> ... 31 levels... >>>> from /opt/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/ >>>> commands/server.rb:39 >>>> from /opt/local/lib/ruby/site_ruby/1.8/rubygems/ >>>> custom_require.rb:27:in `gem_original_require' >>>> from /opt/local/lib/ruby/site_ruby/1.8/rubygems/ >>>> custom_require.rb:27:in `require' >>>> from script/server:3 >>>> >>> >>> _______________________________________________ >>> 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/20071210/9537f47b/attachment.html From heavysixer at gmail.com Tue Dec 11 17:08:37 2007 From: heavysixer at gmail.com (Heavy Sixer) Date: Tue, 11 Dec 2007 16:08:37 -0600 Subject: [Facebooker-talk] before_filter work around Message-ID: <92AAB146-9197-496C-B3D8-72F45B07EAAE@gmail.com> Hi All, I am working on a rails app that has facebook and non-facebook portions and since facebooker seems to want to resolve to the default route of "/" i've written a little before filter that seems to make these two exist OK. def is_facebook_request? redirect_to(params.merge({ :controller => 'facebook_accounts' })) and return false if params.include?('fb_sig') end I just merge my facebook controller into the params hash and redirect to the facebook controller for methods which try and resolve to the default "/" actions. Hope that is helpful to someone besides me ;-) Later, Mark From digidigo at gmail.com Thu Dec 13 13:50:46 2007 From: digidigo at gmail.com (David Clements) Date: Thu, 13 Dec 2007 11:50:46 -0700 Subject: [Facebooker-talk] session.send_notification for emails In-Reply-To: References: Message-ID: Hey All, I am wondering if anyone has done any work around sending emails through the API. It looks like facebooker is using part of a deprecated API, Notifications.send used to take an email part. They now have a Notifications.sendEmail call which will take recipients, subject, text part and fbml part. Looking at the code it seems like I need to add a method to the session "send_email" then I need to add a Parser. Anyone else already tackled it? If not I will. Thanks, Dave From shanev at gmail.com Thu Dec 13 13:55:47 2007 From: shanev at gmail.com (Shane Vitarana) Date: Thu, 13 Dec 2007 12:55:47 -0600 Subject: [Facebooker-talk] session.send_notification for emails In-Reply-To: References: Message-ID: <4ab757a40712131055y465e457atf16544019be7dae9@mail.gmail.com> I was going to do it but since you've already looked into it, I say go for it. Shane On 12/13/07, David Clements wrote: > Hey All, > > I am wondering if anyone has done any work around sending emails > through the API. It looks like facebooker is using part of a > deprecated API, Notifications.send used to take an email part. They > now have a Notifications.sendEmail call which will take recipients, > subject, text part and fbml part. > > Looking at the code it seems like I need to add a method to the > session "send_email" then I need to add a Parser. > > Anyone else already tackled it? If not I will. > > Thanks, > > Dave > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > -- http://myfitbuddy.com | http://shanesbrain.net | http://crimsonjet.com From geraldbauer2007 at gmail.com Wed Dec 19 12:33:58 2007 From: geraldbauer2007 at gmail.com (Gerald Bauer) Date: Wed, 19 Dec 2007 09:33:58 -0800 Subject: [Facebooker-talk] Using the Facebooker gem? Tell us about your Facebook app - Facebooker Sightings Series Message-ID: <7e7cb8940712190933s74ac4dc1m7e6c5cb49426d21c@mail.gmail.com> Hello, May I introduce myself - I'm the publisher of the new ruby API for facebook site (for now titled rfacebook questions & answers) - and way back I've published the Java Web Start F.A.Q (*1). Anyways, if you're using the Facebooker gem I invite you to let us know about your Facebook app and if you're sign-on I will follow-up with sending you four easy questions to to spotlight your Facebooker applications in a new monthly Facebooker Sightings series on the ruby API for facebook questions & answers site @ http://rfacebook.wordpress.com You can see the 1st posting in the rfacebook Sighting series online @ http://rfacebook.wordpress.com/2007/12/19/ithinker used as a model for the new Facebooker Sighting series. Cheers. Gerald PS: (*1) http://lopica.sourceforge.net/faq.html ______________________________________________________________ Gerald Bauer - Internet & Rails Professional - http://geraldbauer.wordpress.com From heavysixer at gmail.com Thu Dec 20 13:39:00 2007 From: heavysixer at gmail.com (Heavy Sixer) Date: Thu, 20 Dec 2007 12:39:00 -0600 Subject: [Facebooker-talk] facebooker rails 2.0 Message-ID: Hey guys, Anyone using facebooker on a rails 2.0 site? I noticed at least one deprecated call in facebooker, which i am working on a patch for but didn't know if anyone else has tried it out on the new build of rails yet. Later, Mark From heavysixer at gmail.com Thu Dec 20 17:59:39 2007 From: heavysixer at gmail.com (Heavy Sixer) Date: Thu, 20 Dec 2007 16:59:39 -0600 Subject: [Facebooker-talk] Relative URL fix Message-ID: <9D47C598-5CA2-4BD6-B082-DC85B912D962@gmail.com> Hi Facebookers, I have been working on a change to facebooker to allow facebook and non-facebook apps to exist on the same code-base. I modified the url rewriting in facebooker a bit so that it would continue to use the facebook relative url when needed but not prepend the facebook app name to controller paths that didn't have anything to do with your facebook app. Here is the current problem: Take for example a resource named sessions and ENV ['FACEBOOKER_RELATIVE_URL_ROOT'] = 'facebook_app'. Sessions has nothing to do with your facebook app yet as Facebooker is written presently "sessions_path" will produce "facebook_app/sessions/" even if the sessions controller doesn't call any of the facebooker before_filters. Part of the reason for this is that the url_writing methods add the key :skip_relative_url_root to the options hash for the url_rewrite method. It is assigned a boolean value and passed along to the ActionController::UrlRewriter#rewrite_url method. Unfortunately, rewrite_url cares about the existence of the key not only its' value. def rewrite_url(path, options) url = old_rewrite_url(path, options) if ActionController::check_mode_and_base unless options[:skip_relative_url_root] url = url.gsub(@request.protocol + @request.host_with_port, '') url = BASE_URL + url end end url end Here is a slight change to the rewrite_url_with_facebooker method, which deletes the :skip_relative_url_root key if it is true. def rewrite_url_with_facebooker(*args) options = args.first.is_a?(Hash) ? args.first : args.last is_link_to_canvas=link_to_canvas?(@request.request_parameters, options) options[:skip_relative_url_root] ||= !is_link_to_canvas options.delete(:skip_relative_url_root) if options [:skip_relative_url_root] == true && !is_link_to_canvas if is_link_to_canvas && !options.has_key?(:host) options[:host] = "apps.facebook.com" end options.delete(:canvas) rewrite_url_without_facebooker(*args) end Though this produced one failing test in the facebook rails integration tests. The "test_url_for_doesnt_include_url_root_when_not_linked_to_canvas" failed but when i looked at the controller it was still testing for facebook variables namely the before_filters. This was not the same as having a controller that didn't really have any knowledge of the facebook portion of the app, which is what the test seemed to imply. I created a NonFacebookController like so: class NonFacebookController < ActionController::Base def link_test render :text=>'link' end def rescue_action(e) raise e end end And changed the routing to include a default path like so: ActionController::Routing::Routes.draw do |map| map.connect 'require_auth/:action', :controller => "controller_which_requires_facebook_authentication" map.connect 'require_install/:action', :controller => "controller_which_requires_application_installation" map.connect ':controller/:action/:id' end I changed the "test_url_for_doesnt_include_url_root_when_not_linked_to_canvas" like so: def test_url_for_doesnt_include_url_root_when_not_linked_to_canvas @controller = NonFacebookController.new get :link_test,example_rails_params_including_fb.merge (:fb_sig_in_canvas=>0,:canvas=>false) assert !@response.body.match(/root/) end All tests pass again. Please let me know if this seems like a reasonable approach. I am happy to bundle this into a diff if anyone would like it added to the facebooker core. Later, Mark def test_url_for_doesnt_include_url_root_when_not_linked_to_canvas @controller = NonFacebookController.new get :link_test,example_rails_params_including_fb.merge (:fb_sig_in_canvas=>0,:canvas=>false) assert !@response.body.match(/root/) end -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/facebooker-talk/attachments/20071220/d2021400/attachment.html From shanev at gmail.com Thu Dec 20 19:26:54 2007 From: shanev at gmail.com (Shane Vitarana) Date: Thu, 20 Dec 2007 18:26:54 -0600 Subject: [Facebooker-talk] facebooker rails 2.0 In-Reply-To: References: Message-ID: <4ab757a40712201626p50a7f125l3f11b3b3c3c262d3@mail.gmail.com> Which call is it? I'm running Rails 2.0.1 just fine with facebooker. On Dec 20, 2007 12:39 PM, Heavy Sixer wrote: > Hey guys, > Anyone using facebooker on a rails 2.0 site? I noticed at least one > deprecated call in facebooker, which i am working on a patch for but > didn't know if anyone else has tried it out on the new build of rails > yet. > > Later, > Mark > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > -- http://myfitbuddy.com | http://shanesbrain.net | http://crimsonjet.com From heavysixer at gmail.com Sat Dec 22 16:55:16 2007 From: heavysixer at gmail.com (Heavy Sixer) Date: Sat, 22 Dec 2007 15:55:16 -0600 Subject: [Facebooker-talk] updates on changes Message-ID: <29F4A885-6CB2-4060-BEB7-62E235F617EF@gmail.com> Hey guys, Is there anyway to get a notification when the trunk of the project has been updated? Is this something that rubyforge does or is there a way to add a message to the post commit hook on svn? It'd be great to keep up to date on "what's new" on the app. Later, Mark From heavysixer at gmail.com Sat Dec 22 17:58:49 2007 From: heavysixer at gmail.com (Heavy Sixer) Date: Sat, 22 Dec 2007 16:58:49 -0600 Subject: [Facebooker-talk] upgraded to rails 2.0.1 and borked sessions Message-ID: <6192E7EE-902F-4E47-9C28-D9863F4911F6@gmail.com> I just pushed my facebook app up to 2.0.1 and noticed that I am now getting these errors: ActionView::TemplateError (Session key invalid or no longer valid) on line #3 of users/index.fbml.erb: It appears that I get the facebook_session object back but when i introspect and try and get the user's name or something i get the session error. Has anyone else had these problems? Later, Mark From heavysixer at gmail.com Sat Dec 22 20:28:35 2007 From: heavysixer at gmail.com (Heavy Sixer) Date: Sat, 22 Dec 2007 19:28:35 -0600 Subject: [Facebooker-talk] Fwd: upgraded to rails 2.0.1 and borked sessions References: <6192E7EE-902F-4E47-9C28-D9863F4911F6@gmail.com> Message-ID: This is a follow up message to my last post. The error was with 2.0.2 not 2.0.1 Here is what I know about the problem. I created a new app in 2.0.2 e.g. : "rails some_app" when i did a simple introspection of the user object (for example getting the user's name) i'd get the invalid session. However, creating an app using the rails 2.0.1 gem e.g.: "rails some_app" did not produce the error on the same introspection. Now, I did try changing the RAILS_GEM_VERSION = '2.0.1' in the version the 2.0.2 app created but it still would not work for me (even though it should have been using the 2.0.1 gem). This really seems like black magic to me, and I wish i had more info to help anyone else who might find themselves in a similar situation. However, I would be interested to know if someone has been able to generate a rails app from the 2.0.2 source and get facebooker to run without getting the invalid or expired Session Key. Later, Mark Begin forwarded message: > From: Heavy Sixer > Date: December 22, 2007 4:58:49 PM CST > To: facebooker-talk at rubyforge.org > Subject: upgraded to rails 2.0.1 and borked sessions > > I just pushed my facebook app up to 2.0.1 and noticed that I am now > getting these errors: > > ActionView::TemplateError (Session key invalid or no longer valid) > on line #3 of users/index.fbml.erb: > > It appears that I get the facebook_session object back but when i > introspect and try and get the user's name or something i get the > session error. Has anyone else had these problems? > > Later, > Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/facebooker-talk/attachments/20071222/6bd52e6b/attachment-0001.html From heavysixer at gmail.com Sat Dec 22 23:32:45 2007 From: heavysixer at gmail.com (Heavy Sixer) Date: Sat, 22 Dec 2007 22:32:45 -0600 Subject: [Facebooker-talk] Session Errors not related to rails 2.0.2 Message-ID: <30880027-8DC0-481E-9C7E-7E629F2E736D@gmail.com> It appears that the errors, which i said were related to rails 2.0.2 were in fact caused by the session marshaling that occurs between rails and facebook. Because the cookie was being modified by facebook Rails saw it as an invalid session. Here is how I got around this problem. 1. Deleted all my cookies related to my application 2. Changed my session store to an ActiveRecord session store 3. Uncommented the :secret param from the "protect_from_forgery" method inside application.rb 4. Removed my application from my facebook profile 5. Readded the application. Everything seems to work now! Hope that is helpful to someone. Best, Mark