From mmangino at elevatedrails.com Fri Nov 2 12:58:23 2007 From: mmangino at elevatedrails.com (Mike Mangino) Date: Fri, 2 Nov 2007 11:58:23 -0500 Subject: [Facebooker-talk] Some proposed changes Message-ID: <916DA7F6-1A42-46A6-AE38-7DE892A5E42E@elevatedrails.com> I've got some changes queued up that I want to run by everyone before I commit. First, I've added a filter that sets the :format variable to "fbml" when you are in the canvas view. That means with edge rails you can use index.fbml.erb for facebook and index.html.erb for non facebook requests and the right thing will happen. This is important for doing things with OpenSocial (which is IFrame based.) I also modified init.rb to include Facebooker::Rails::Controller in subclasses of ActionController::Base. Without this change, redirect_to is defined in the wrong place and is too far back in the ancestors change to ever get used. This makes facebooker usable out of the box for me. My controller now looks like: class ApplicationController < ActionController::Base session :off ensure_application_is_installed_by_facebook_user end Does anyone object to these changes? The format change could cause issues for people on edge, but is he right thing IMHO. Mike -- Mike Mangino http://www.elevatedrails.com From chad at chadfowler.com Fri Nov 2 14:17:05 2007 From: chad at chadfowler.com (Chad Fowler) Date: Fri, 2 Nov 2007 14:17:05 -0400 Subject: [Facebooker-talk] Some proposed changes In-Reply-To: <916DA7F6-1A42-46A6-AE38-7DE892A5E42E@elevatedrails.com> References: <916DA7F6-1A42-46A6-AE38-7DE892A5E42E@elevatedrails.com> Message-ID: <0604E110-9F71-4405-A2F3-ACA08107D62A@chadfowler.com> On Nov 2, 2007, at 12:58 PM, Mike Mangino wrote: > I've got some changes queued up that I want to run by everyone before > I commit. > > First, I've added a filter that sets the :format variable to "fbml" > when you are in the canvas view. That means with edge rails you can > use index.fbml.erb for facebook and index.html.erb for non facebook > requests and the right thing will happen. This is important for doing > things with OpenSocial (which is IFrame based.) > > I also modified init.rb to include Facebooker::Rails::Controller in > subclasses of ActionController::Base. Without this change, redirect_to > is defined in the wrong place and is too far back in the ancestors > change to ever get used. This makes facebooker usable out of the box > for me. My controller now looks like: > > > class ApplicationController < ActionController::Base > session :off > ensure_application_is_installed_by_facebook_user > end > > Does anyone object to these changes? The format change could cause > issues for people on edge, but is he right thing IMHO > I agree on both of them. Chad > - > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk From facebooker at tmm1.net Mon Nov 5 18:39:33 2007 From: facebooker at tmm1.net (Aman Gupta) Date: Mon, 5 Nov 2007 19:39:33 -0400 Subject: [Facebooker-talk] JSON version of parser.rb Message-ID: All Facebook API requests have a format option that can be set to JSON, which results in a response which is both faster (marginally so, but still) and uses a lot less bandwidth (http://flickr.com/photos/agentdero/1550274105, http://flickr.com/photos/agentdero/1551136674) Any chance of Facebooker supporting JSON? Aman Gupta From chad at chadfowler.com Tue Nov 6 11:41:54 2007 From: chad at chadfowler.com (Chad Fowler) Date: Tue, 6 Nov 2007 11:41:54 -0500 Subject: [Facebooker-talk] JSON version of parser.rb In-Reply-To: References: Message-ID: On 11/5/07, Aman Gupta wrote: > > All Facebook API requests have a format option that can be set to > JSON, which results in a response which is both faster (marginally so, > but still) and uses a lot less bandwidth > (http://flickr.com/photos/agentdero/1550274105, > http://flickr.com/photos/agentdero/1551136674) > > Any chance of Facebooker supporting JSON? I would be open to a patch to do this as long as it were well covered by unit tests and it were done in such a way that JSON were entirely optional. One of the reasons we wrote Facebooker is that we have a Ruby client install into which we have to statically compile all external C libraries, so we needed to keep externals minimal. Chad -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/facebooker-talk/attachments/20071106/9e1bd5c7/attachment.html From daniel.facebooker at tenner.org Wed Nov 7 08:10:57 2007 From: daniel.facebooker at tenner.org (Daniel Tenner) Date: Wed, 7 Nov 2007 13:10:57 +0000 Subject: [Facebooker-talk] Tutorials & release timetable Message-ID: <8A638ABB-D132-49BB-9A94-52697A8E9ED2@tenner.org> Hi, I want to try Facebooker again for a new project, after a moderately painful couple of months with RFacebook. I see there is some activity on the project, but still can't find any docs or tutorials or such anywhere, and was wondering if anyone had located any of those hidden away somewhere in some dark confine of the internet... It would probably be quite handy to get some sort of list of them, if there are any, so any newcomer can check the mailing list archives to find these links... so do feel free to come forth with any possible examples :-) Also wondering whether there's any time table yet for the first release of Facebooker... it appears to be ready enough for a number of people to be using it around the web. Perhaps releasing it would encourage them to put up articles describing how they're using it. Cheers, Daniel From jon at professionalnerd.com Fri Nov 9 13:58:07 2007 From: jon at professionalnerd.com (Jon Gilbraith) Date: Fri, 9 Nov 2007 18:58:07 +0000 Subject: [Facebooker-talk] Helpers and URL Rewriting Message-ID: Hey folks, I'm part way through a project using, I think rev 73 of Facebooker, and was getting along pretty well. I've since tried the latest rev (86) and have run into a few problems. First one was with the helpers in that for some reason now none of them are available so I've had to use helper :application, etc in my controller. Second one, which unfortunately means I think I'll have to switch back to the older revision is with the URL rewriting. I'm writing an application that's available outside of Facebook too and I'm finding that on non canvas pages my canvas path still is being added to all my generated URLs. In addition, with my stylesheet the basename had been substituted too. The svn logs suggested that possibly work on the URL rewrite might not be complete, is that the right assumption? Anyway, I hope this is the best way to let you know these sorts of things. All is pretty quiet on the bug tracker and here on the mailing list so I'm guessing some of you are communicating directly. My ruby skills are still pretty amateurish so doubt I'll be able to contribute any code but if this sort info is of help then maybe I'll be able to help with some testing. Cheers, Jon From mmangino at elevatedrails.com Fri Nov 9 15:49:54 2007 From: mmangino at elevatedrails.com (Mike Mangino) Date: Fri, 9 Nov 2007 14:49:54 -0600 Subject: [Facebooker-talk] Helpers and URL Rewriting In-Reply-To: References: Message-ID: <0DEB4CF0-EB7D-429C-B98A-89E5770884C2@elevatedrails.com> Oops. At least part of that was my fault. I broke the helper and layout loading. I'll get that fixed and checked in shortly. Is it a problem to have the canvas path added to your non-facebook URLs? How would you determine which links should have the canvas path added and which should not? Mike On Nov 9, 2007, at 12:58 PM, Jon Gilbraith wrote: > Hey folks, > > I'm part way through a project using, I think rev 73 of Facebooker, > and was getting along pretty well. I've since tried the latest rev > (86) and have run into a few problems. > > First one was with the helpers in that for some reason now none of > them are available so I've had to use helper :application, etc in my > controller. > > Second one, which unfortunately means I think I'll have to switch > back to the older revision is with the URL rewriting. I'm writing an > application that's available outside of Facebook too and I'm finding > that on non canvas pages my canvas path still is being added to all > my generated URLs. In addition, with my stylesheet the basename had > been substituted too. The svn logs suggested that possibly work on > the URL rewrite might not be complete, is that the right assumption? > > Anyway, I hope this is the best way to let you know these sorts of > things. All is pretty quiet on the bug tracker and here on the > mailing list so I'm guessing some of you are communicating directly. > > My ruby skills are still pretty amateurish so doubt I'll be able to > contribute any code but if this sort info is of help then maybe I'll > be able to help with some testing. > > Cheers, > > Jon > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk -- Mike Mangino http://www.elevatedrails.com From jon at professionalnerd.com Fri Nov 9 17:00:46 2007 From: jon at professionalnerd.com (Jon Gilbraith) Date: Fri, 9 Nov 2007 22:00:46 +0000 Subject: [Facebooker-talk] Helpers and URL Rewriting In-Reply-To: <0DEB4CF0-EB7D-429C-B98A-89E5770884C2@elevatedrails.com> References: <0DEB4CF0-EB7D-429C-B98A-89E5770884C2@elevatedrails.com> Message-ID: <1B3CAACC-70D9-411D-BD98-0E40BBE67ED2@professionalnerd.com> Hey Mike, Currently I define a custom mime type for fbml then have two sets of views and use respond_to in the controller to separate the logic. So the last piece of my puzzle is to deal with the routing. What I've done so far is to write a method which I wrap my *_path calls with to modify the url before it's sent to link_to, redirect_to, etc. So, what I thought might be appropriate would be to check request_is_for_a_facebook_canvas? and if true modify the route appropriately in url_for, but if not then to leave it as it is. I imagine though that this wouldn't work with iframe apps so I'm not so sure what's best. Unfortunately I've not been able to find too much material on writing apps that exist inside as well as outside of facebook so I'm still trying to work out what I should be dealing with myself and what's expected to be performed by a plugin. What do you reckon? Jon On 9 Nov 2007, at 20:49, Mike Mangino wrote: > Oops. At least part of that was my fault. I broke the helper and > layout loading. I'll get that fixed and checked in shortly. > > Is it a problem to have the canvas path added to your non-facebook > URLs? > > How would you determine which links should have the canvas path > added and which should not? > > Mike > > On Nov 9, 2007, at 12:58 PM, Jon Gilbraith wrote: > >> Hey folks, >> >> I'm part way through a project using, I think rev 73 of Facebooker, >> and was getting along pretty well. I've since tried the latest rev >> (86) and have run into a few problems. >> >> First one was with the helpers in that for some reason now none of >> them are available so I've had to use helper :application, etc in my >> controller. >> >> Second one, which unfortunately means I think I'll have to switch >> back to the older revision is with the URL rewriting. I'm writing an >> application that's available outside of Facebook too and I'm finding >> that on non canvas pages my canvas path still is being added to all >> my generated URLs. In addition, with my stylesheet the basename had >> been substituted too. The svn logs suggested that possibly work on >> the URL rewrite might not be complete, is that the right assumption? >> >> Anyway, I hope this is the best way to let you know these sorts of >> things. All is pretty quiet on the bug tracker and here on the >> mailing list so I'm guessing some of you are communicating directly. >> >> My ruby skills are still pretty amateurish so doubt I'll be able to >> contribute any code but if this sort info is of help then maybe I'll >> be able to help with some testing. >> >> Cheers, >> >> Jon >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/facebooker-talk > > -- > Mike Mangino > http://www.elevatedrails.com > > > !DSPAM:4734c80c136991557044017! > > From jon at professionalnerd.com Sat Nov 10 12:10:59 2007 From: jon at professionalnerd.com (Jon Gilbraith) Date: Sat, 10 Nov 2007 17:10:59 +0000 Subject: [Facebooker-talk] Facebooker Rdoc Message-ID: <88B93424-CEC4-40BD-86AE-AD80E415704C@professionalnerd.com> Hey folks, I've stuck a copy of the latest rdoc online, along with a few other useful bits of information and links. I'll update it any time I see any new commits. http://facebooker.professionalnerd.com/ Cheers, Jon -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/facebooker-talk/attachments/20071110/2a53ce76/attachment.html From shanev at gmail.com Sun Nov 18 04:12:57 2007 From: shanev at gmail.com (Shane Vitarana) Date: Sun, 18 Nov 2007 03:12:57 -0600 Subject: [Facebooker-talk] Pseudo resource routes Message-ID: <4ab757a40711180112g64feece4x22985a94a8549059@mail.gmail.com> I added a route mapper called facebook_resources. This allows you to create pseudo-resource routes. Since everything is a POST in Facebook, you can't identify routes using HTTP verbs. Each route is prefixed with its action, except for index. Example: map.facebook_resources :profiles Will give you the following named routes: new_profile POST /profiles/new profiles POST /profiles/index show_profile POST /profiles/:id/show create_profile POST /profiles/create edit_profile POST /profiles/:id/edit update_profile POST /profiles/:id/update destroy_profile POST /profiles/:id/destroy This is still very basic. No nested routes or singular resources yet. Shane -- http://myfitbuddy.com | http://shanesbrain.net | http://crimsonjet.com From shanev at gmail.com Wed Nov 21 03:26:13 2007 From: shanev at gmail.com (Shane Vitarana) Date: Wed, 21 Nov 2007 02:26:13 -0600 Subject: [Facebooker-talk] Upgrade to latest trunk if you're getting "undefined method `degree='" Message-ID: <4ab757a40711210026l35dcac6ak94b42df65925430d@mail.gmail.com> Facebook added the 'degree' field to education info. This breaks user.populate because the 'degree' field doesn't exist in the education history model. On a side note, if a method calls a dangerous method (ending with !), shouldn't it be classified as dangerous too? Shane -- http://myfitbuddy.com | http://shanesbrain.net | http://crimsonjet.com From shanev at gmail.com Thu Nov 29 20:26:36 2007 From: shanev at gmail.com (Shane Vitarana) Date: Thu, 29 Nov 2007 19:26:36 -0600 Subject: [Facebooker-talk] Tests not passing Message-ID: <4ab757a40711291726s31910ea8y1cfb23532fe8d562@mail.gmail.com> There is a catch-all rescue at the bottom of rails_integration_test that stops the tests from running if any of the require statements fail. In my case, require File.dirname(__FILE__)+'/../init' fails and none of the tests get run. When I comment out that line, there are a couple of failures relating to redirection. Shane -- http://myfitbuddy.com http://shanesbrain.net From shanev at gmail.com Thu Nov 29 20:38:43 2007 From: shanev at gmail.com (Shane Vitarana) Date: Thu, 29 Nov 2007 19:38:43 -0600 Subject: [Facebooker-talk] Rails test helpers Message-ID: <4ab757a40711291738q3f9776a7m830b2f27ae8a5b64@mail.gmail.com> Hey guys- I started a module for Rails test helpers. The first one is assert_fb_redirect. This is like Rails' assert_redirect, but works for the fb:redirect FBML tag. Any ideas for more? I was thinking about a version of assert_select that works with Facebook. assert_select is based on CSS selectors, which won't work with Facebook since the use of colons (:) in search queries conflicts with colons in FBML tags. We need something for view testing. Maybe an XPath based helper? What is everyone using for view testing right now? Shane -- http://myfitbuddy.com | http://shanesbrain.net | http://crimsonjet.com