From chrisnolan.ca+rubyforge at gmail.com Wed Oct 1 01:10:03 2008 From: chrisnolan.ca+rubyforge at gmail.com (Chris Nolan.ca) Date: Wed, 1 Oct 2008 01:10:03 -0400 Subject: [Facebooker-talk] publish_user_action strangeness.. In-Reply-To: <3b8cec990809301251k59d3c8f4me105c5fa0a09e93@mail.gmail.com> References: <3b8cec990809301251k59d3c8f4me105c5fa0a09e93@mail.gmail.com> Message-ID: <4f6b19c0809302210o3d020bddw1a9a8368f743fd1@mail.gmail.com> There have been some strange issues with images in feeds lately. Post a note on http://bugs.developers.facebook.com/show_bug.cgi?id=2417 and Jerry might be able to fix things up for you. Chris Nolan.ca Eliminating layers between fan and creator, publisher and retailer http://PullBot.com/ http://ChrisNolan.ca/ On Tue, Sep 30, 2008 at 15:51, John Bresnik wrote: > For some bizarre reason I can only get images to show up in the feeds when > the app is running on port 8000 (confirmed this a few times) - anyone else > seen this? > > Thanks > > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > > From jbresnik at gmail.com Wed Oct 1 02:47:03 2008 From: jbresnik at gmail.com (John Bresnik) Date: Tue, 30 Sep 2008 23:47:03 -0700 Subject: [Facebooker-talk] publish_user_action strangeness.. In-Reply-To: <4f6b19c0809302210o3d020bddw1a9a8368f743fd1@mail.gmail.com> References: <3b8cec990809301251k59d3c8f4me105c5fa0a09e93@mail.gmail.com> <4f6b19c0809302210o3d020bddw1a9a8368f743fd1@mail.gmail.com> Message-ID: <3b8cec990809302347w286cc2dah4763d5ab0ae99ec6@mail.gmail.com> Yea started working on it's own.. thanks for the replies. On Tue, Sep 30, 2008 at 10:10 PM, Chris Nolan.ca wrote: > There have been some strange issues with images in feeds lately. > Post a note on > http://bugs.developers.facebook.com/show_bug.cgi?id=2417 > and Jerry might be able to fix things up for you. > > Chris Nolan.ca > Eliminating layers between fan and creator, publisher and retailer > http://PullBot.com/ > http://ChrisNolan.ca/ > > > > On Tue, Sep 30, 2008 at 15:51, John Bresnik wrote: > > For some bizarre reason I can only get images to show up in the feeds > when > > the app is running on port 8000 (confirmed this a few times) - anyone > else > > seen this? > > > > Thanks > > > > _______________________________________________ > > Facebooker-talk mailing list > > Facebooker-talk at rubyforge.org > > http://rubyforge.org/mailman/listinfo/facebooker-talk > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From vincentchu at gmail.com Wed Oct 1 14:40:45 2008 From: vincentchu at gmail.com (vincent chu) Date: Wed, 1 Oct 2008 11:40:45 -0700 Subject: [Facebooker-talk] Facebooker offline_access Message-ID: Hi All -- I just watched Mike's excellent screencasts on facebooker. Anyway, I'd like to move beyond those examples to some more complicated ones, but am having trouble conceptualizing a few points. I'd like to develop an application that pushes content to a user's profile box / news feed (and possibly photos, etc..) OFFLINE. However, from what I gather, all of the entries in the User table that was generated by facebooker_authentication all have expiration times. To me, this means that my app can only push updates when the user is logged in to facebook and has pinged my app (which updates the User table). The natural solution seems to be the fb_prompt_permission call to facebooker, which I included as: <%= fb_prompt_permission "offline_access", "Let the app have offline access" %> My question is this: how do I update the User table at this point to reflect the fact that the session is no infinite? Any sample code would be *very* helpful since I'm not only new at facebooker, I'm pretty new at RoR. ============= Next question: I'd also like to periodically check to see what permissions my application has (e.g., does my app still have an infinite session, or was this revoked by the user at some point). To do this, I'd like to query the FQL permissions table ( http://wiki.developers.facebook.com/index.php/Permissions_(FQL) ). However, I wasn't able to figure out how to get a valid session to query the database with. Experimenting in the console, I first created a Facebooker::Session: >> session = Facebooker::Session.new(Facebooker::Session.api_key, Facebooker::Session.secret_key) => # It seems like I can make fql queries on publicly available information: >> session.fql_query('select name from user where uid=509113181') => [#, @secret_key="XXX", @api_key="XXX">>] However, I can't make any fql queries on private information. This is pretty obvious because I don't have a valid session key: >> session.fql_query('select uid from permissions where email=1') Facebooker::Session::SessionExpired: Session key invalid or no longer valid: from /home/Gooth/projects/rails/posterous/vendor/plugins/facebooker/lib/facebooker/parser.rb:462:in `process' from /home/Gooth/projects/rails/posterous/vendor/plugins/facebooker/lib/facebooker/parser.rb:15:in `parse' from /home/Gooth/projects/rails/posterous/vendor/plugins/facebooker/lib/facebooker/service.rb:14:in `post' from /home/Gooth/projects/rails/posterous/vendor/plugins/facebooker/lib/facebooker/session.rb:466:in `post_without_logging' from /home/Gooth/projects/rails/posterous/vendor/plugins/facebooker/lib/facebooker/session.rb:477:in `post' from /home/Gooth/projects/rails/posterous/vendor/plugins/facebooker/lib/facebooker/logging.rb:16:in `log_fb_api' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/core_ext/benchmark.rb:8:in `realtime' from /home/Gooth/projects/rails/posterous/vendor/plugins/facebooker/lib/facebooker/logging.rb:16:in `log_fb_api' from /home/Gooth/projects/rails/posterous/vendor/plugins/facebooker/lib/facebooker/session.rb:476:in `post' from /home/Gooth/projects/rails/posterous/vendor/plugins/facebooker/lib/facebooker/session.rb:167:in `fql_query' from (irb):10 So, my question is: How do I get a valid session key "offline" so that I can run maintainence tasks offline? Cheers, and thanks for the help. Vince From jonathan.otto at gmail.com Wed Oct 1 16:28:47 2008 From: jonathan.otto at gmail.com (Jonathan Otto) Date: Wed, 1 Oct 2008 15:28:47 -0500 Subject: [Facebooker-talk] execution expired Message-ID: Anyone getting "execution expired" from API calls to the FB REST server (presumably taking too long)? (I am on a Joyent Accelerator - Open Solaris, Ruby 1.8.7, Rails 2.1) I have been getting them for months, but I'm thinking there must be others getting them too. How are you handling them? I am using the exception notifier plugin, and calling session[:facebook_session].user.name is one example that frequently times out. From digidigo at gmail.com Thu Oct 2 12:30:53 2008 From: digidigo at gmail.com (David Clements) Date: Thu, 2 Oct 2008 10:30:53 -0600 Subject: [Facebooker-talk] execution expired In-Reply-To: References: Message-ID: I haven't been seeing this but I do occasionally get Errno::ECONNRESET Which I catch and retry in session post. Dave On Wed, Oct 1, 2008 at 2:28 PM, Jonathan Otto wrote: > Anyone getting "execution expired" from API calls to the FB REST > server (presumably taking too long)? (I am on a Joyent Accelerator - > Open Solaris, Ruby 1.8.7, Rails 2.1) > > I have been getting them for months, but I'm thinking there must be > others getting them too. How are you handling them? > > I am using the exception notifier plugin, and calling > session[:facebook_session].user.name is one example that frequently > times out. > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > -------------- next part -------------- An HTML attachment was scrubbed... URL: From digidigo at gmail.com Sun Oct 5 15:22:33 2008 From: digidigo at gmail.com (David Clements) Date: Sun, 5 Oct 2008 13:22:33 -0600 Subject: [Facebooker-talk] Offline Access Permission Issues? Message-ID: Has anyone gotten the offline_access permission to work as a before filter? I am noticing that fb_sig_ext_perms parameter never includes it even if it is granted. Wiki seems to indicate that it should be available. Thanks, Dave -------------- next part -------------- An HTML attachment was scrubbed... URL: From gotwalt at gmail.com Sun Oct 5 15:48:39 2008 From: gotwalt at gmail.com (Aaron Gotwalt) Date: Sun, 5 Oct 2008 15:48:39 -0400 Subject: [Facebooker-talk] Publisher sizes? Message-ID: I've registered a template with facebook, and am able to correctly publish a multi-line story. Is there a way to specify the story_size parameter for the Feed.publishUserAction API call that I'm missing? Does facebook's aggregator auto-select the story size? From digidigo at gmail.com Sun Oct 5 15:58:40 2008 From: digidigo at gmail.com (David Clements) Date: Sun, 5 Oct 2008 13:58:40 -0600 Subject: [Facebooker-talk] Publisher sizes? In-Reply-To: References: Message-ID: If I understand your question correctly the answer is no. Facebook leaves it up the user to select the size of the story to display. And the initial story size will be controlled by the aggregator, if lot's of stories get aggregated the the size of the story gets bigger, I believe. Dave On Sun, Oct 5, 2008 at 1:48 PM, Aaron Gotwalt wrote: > I've registered a template with facebook, and am able to correctly publish > a multi-line story. Is there a way to specify the story_size parameter for > the Feed.publishUserAction API call that I'm missing? Does facebook's > aggregator auto-select the story size? > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wthomas989 at yahoo.com Tue Oct 7 16:08:37 2008 From: wthomas989 at yahoo.com (William Thomas) Date: Tue, 7 Oct 2008 13:08:37 -0700 (PDT) Subject: [Facebooker-talk] Friends.get w/out session? Message-ID: <667075.19397.qm@web58707.mail.re1.yahoo.com> I'm having troubles getting an approved user's friends list without a session key... The FB documentation says I should be able to. Has anybody used this successfully ? s = Facebooker::Session.new(Facebooker.api_key, Facebooker.secret_key) => # >> s.post('facebook.friends.get',{:uid => '[removed]',false) FACEBOOKER: FACEBOOKER: method - facebook.friends.get FACEBOOKER: api_key - [removed] FACEBOOKER: uid - [removed] FACEBOOKER: call_id - [removed] FACEBOOKER: sig - [removed] FACEBOOKER: v - 1.0 FACEBOOKER: ? 102 ? Session key invalid or no longer valid ? ??? ????? method ????? facebook.friends.get ??? ??? ????? api_key ????? [my api key] ??? ??? ????? uid ????? [ my UID ] ??? ??? ????? call_id ????? [a real call id] ??? ??? ????? sig ????? [a real sig] ??? ??? ????? v ????? 1.0 ??? ? Facebooker::Session::SessionExpired: Session key invalid or no longer valid ??? from [removed]/vendor/plugins/facebooker/lib/facebooker/parser.rb:462:in `process' ??? from [removed]/vendor/plugins/facebooker/lib/facebooker/parser.rb:15:in `parse' ??? from [removed]vendor/plugins/facebooker/lib/facebooker/service.rb:21:in `post' ??? from [removed]vendor/plugins/facebooker/lib/facebooker/session.rb:466:in `post' ??? from (irb):3 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jonathan.otto at gmail.com Tue Oct 7 18:36:43 2008 From: jonathan.otto at gmail.com (Jonathan Otto) Date: Tue, 7 Oct 2008 17:36:43 -0500 Subject: [Facebooker-talk] Friends.get w/out session? In-Reply-To: <667075.19397.qm@web58707.mail.re1.yahoo.com> References: <667075.19397.qm@web58707.mail.re1.yahoo.com> Message-ID: Grab it from params[:fb_sig_friends] On Tue, Oct 7, 2008 at 3:08 PM, William Thomas wrote: > I'm having troubles getting an approved user's friends list without a > session key... The FB documentation says I should be able to. Has anybody > used this successfully ? > > s = Facebooker::Session.new(Facebooker.api_key, Facebooker.secret_key) > => # @api_key="[removed]"> >>> s.post('facebook.friends.get',{:uid => '[removed]',false) > FACEBOOKER: > FACEBOOKER: method - facebook.friends.get > FACEBOOKER: api_key - [removed] > FACEBOOKER: uid - [removed] > FACEBOOKER: call_id - [removed] > FACEBOOKER: sig - [removed] > FACEBOOKER: v - 1.0 > FACEBOOKER: > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://api.facebook.com/1.0/ > http://api.facebook.com/1.0/facebook.xsd"> > > 102 > Session key invalid or no longer valid > > > > method > facebook.friends.get > > > api_key > [my api key] > > > uid > [ my UID ] > > > call_id > [a real call id] > > > sig > [a real sig] > > > v > 1.0 > > > > > Facebooker::Session::SessionExpired: Session key invalid or no longer valid > from [removed]/vendor/plugins/facebooker/lib/facebooker/parser.rb:462:in > `process' > from [removed]/vendor/plugins/facebooker/lib/facebooker/parser.rb:15:in > `parse' > from [removed]vendor/plugins/facebooker/lib/facebooker/service.rb:21:in > `post' > from [removed]vendor/plugins/facebooker/lib/facebooker/session.rb:466:in > `post' > from (irb):3 > > > > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > > From wthomas989 at yahoo.com Tue Oct 7 20:14:54 2008 From: wthomas989 at yahoo.com (William Thomas) Date: Tue, 7 Oct 2008 17:14:54 -0700 (PDT) Subject: [Facebooker-talk] Friends.get w/out session? In-Reply-To: Message-ID: <542471.81928.qm@web58704.mail.re1.yahoo.com> I would like to do it outside of a canvas. --- On Tue, 10/7/08, Jonathan Otto wrote: From: Jonathan Otto Subject: Re: [Facebooker-talk] Friends.get w/out session? To: wthomas989 at yahoo.com Cc: facebooker-talk at rubyforge.org Date: Tuesday, October 7, 2008, 5:36 PM Grab it from params[:fb_sig_friends] On Tue, Oct 7, 2008 at 3:08 PM, William Thomas wrote: > I'm having troubles getting an approved user's friends list without a > session key... The FB documentation says I should be able to. Has anybody > used this successfully ? > > s = Facebooker::Session.new(Facebooker.api_key, Facebooker.secret_key) > => # @api_key="[removed]"> >>> s.post('facebook.friends.get',{:uid => '[removed]',false) > FACEBOOKER: > FACEBOOKER: method - facebook.friends.get > FACEBOOKER: api_key - [removed] > FACEBOOKER: uid - [removed] > FACEBOOKER: call_id - [removed] > FACEBOOKER: sig - [removed] > FACEBOOKER: v - 1.0 > FACEBOOKER: > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://api.facebook.com/1.0/ > http://api.facebook.com/1.0/facebook.xsd"> > > 102 > Session key invalid or no longer valid > > > > method > facebook.friends.get > > > api_key > [my api key] > > > uid > [ my UID ] > > > call_id > [a real call id] > > > sig > [a real sig] > > > v > 1.0 > > > > > Facebooker::Session::SessionExpired: Session key invalid or no longer valid > from [removed]/vendor/plugins/facebooker/lib/facebooker/parser.rb:462:in > `process' > from [removed]/vendor/plugins/facebooker/lib/facebooker/parser.rb:15:in > `parse' > from [removed]vendor/plugins/facebooker/lib/facebooker/service.rb:21:in > `post' > from [removed]vendor/plugins/facebooker/lib/facebooker/session.rb:466:in > `post' > from (irb):3 > > > > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mmangino at elevatedrails.com Wed Oct 8 09:42:12 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Wed, 8 Oct 2008 09:42:12 -0400 Subject: [Facebooker-talk] Friends.get w/out session? In-Reply-To: <542471.81928.qm@web58704.mail.re1.yahoo.com> References: <542471.81928.qm@web58704.mail.re1.yahoo.com> Message-ID: Based on my reading of this information, it sounds like this only works if the user has a valid session for your application. If the user doesn't it sounds like you will get this message. To verify that, visit your application's canvas page and then try this call immediately afterwards from script/console. Does that work? Mike On Oct 7, 2008, at 8:14 PM, William Thomas wrote: > I would like to do it outside of a canvas. > > --- On Tue, 10/7/08, Jonathan Otto wrote: > From: Jonathan Otto > Subject: Re: [Facebooker-talk] Friends.get w/out session? > To: wthomas989 at yahoo.com > Cc: facebooker-talk at rubyforge.org > Date: Tuesday, October 7, 2008, 5:36 PM > > Grab it from params[:fb_sig_friends] > > On Tue, Oct 7, 2008 at 3:08 PM, William Thomas > wrote: > > I'm having troubles getting an approved user's friends list > without a > > session key... The FB documentation says I should be able to. Has > anybody > > used this successfully ? > > > > s = Facebooker::Session.new(Facebooker.api_key, > Facebooker.secret_key) > > => # @secret_key="[removed]", > > @api_key="[removed]"> > >>> s.post('facebook.friends.get',{:uid => > '[removed]',false) > > FACEBOOKER: > > FACEBOOKER: method - facebook.friends.get > > FACEBOOKER: api_key - [removed] > > FACEBOOKER: uid - [removed] > > FACEBOOKER: call_id - [removed] > > FACEBOOKER: sig - [removed] > > FACEBOOKER: v - 1.0 > > FACEBOOKER: encoding="UTF-8"?> > > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > > xsi:schemaLocation="http://api.facebook.com/1.0/ > > http://api.facebook.com/1.0/facebook.xsd"> > > > > 102 > > Session key invalid or no longer > valid > > > > list="true"> > > > > method > > facebook.friends.get > > > > > > api_key > > [my api key] > > > > > > uid > > [ my UID ] > > > > > > call_id > > [a real call id] > > > > > > sig > > [a real sig] > > > > > > v > > 1.0 > > > > > > > > > > > Facebooker::Session::SessionExpired: Session key invalid or no > longer > valid > > from > [removed]/vendor/plugins/facebooker/lib/facebooker/parser.rb:462:in > > `process' > > from > [removed]/vendor/plugins/facebooker/lib/facebooker/parser.rb:15:in > > `parse' > > from > [removed]vendor/plugins/facebooker/lib/facebooker/service.rb:21:in > > `post' > > from > [removed]vendor/plugins/facebooker/lib/facebooker/session.rb:466:in > > `post' > > from (irb):3 > > > > > > > > _______________________________________________ > > 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 -- Mike Mangino http://www.elevatedrails.com From digidigo at gmail.com Wed Oct 8 10:43:53 2008 From: digidigo at gmail.com (David Clements) Date: Wed, 8 Oct 2008 08:43:53 -0600 Subject: [Facebooker-talk] Friends.get w/out session? In-Reply-To: References: <542471.81928.qm@web58704.mail.re1.yahoo.com> Message-ID: I am not remembering the specifics.. But I believe we have seen this problem before when we pass a session key for a method that no longer requires it. Facebook wasn't doing the smart thing and ignoring it, instead they are still trying to validate it. Dave On Wed, Oct 8, 2008 at 7:42 AM, Mike Mangino wrote: > Based on my reading of this information, it sounds like this only works if > the user has a valid session for your application. If the user doesn't it > sounds like you will get this message. To verify that, visit your > application's canvas page and then try this call immediately afterwards from > script/console. Does that work? > > Mike > > > On Oct 7, 2008, at 8:14 PM, William Thomas wrote: > > I would like to do it outside of a canvas. >> >> --- On Tue, 10/7/08, Jonathan Otto wrote: >> From: Jonathan Otto >> Subject: Re: [Facebooker-talk] Friends.get w/out session? >> To: wthomas989 at yahoo.com >> Cc: facebooker-talk at rubyforge.org >> Date: Tuesday, October 7, 2008, 5:36 PM >> >> Grab it from params[:fb_sig_friends] >> >> On Tue, Oct 7, 2008 at 3:08 PM, William Thomas >> wrote: >> > I'm having troubles getting an approved user's friends list >> without a >> > session key... The FB documentation says I should be able to. Has >> anybody >> > used this successfully ? >> > >> > s = Facebooker::Session.new(Facebooker.api_key, >> Facebooker.secret_key) >> > => #> @secret_key="[removed]", >> > @api_key="[removed]"> >> >>> s.post('facebook.friends.get',{:uid => >> '[removed]',false) >> > FACEBOOKER: >> > FACEBOOKER: method - facebook.friends.get >> > FACEBOOKER: api_key - [removed] >> > FACEBOOKER: uid - [removed] >> > FACEBOOKER: call_id - [removed] >> > FACEBOOKER: sig - [removed] >> > FACEBOOKER: v - 1.0 >> > FACEBOOKER: > encoding="UTF-8"?> >> > > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >> > xsi:schemaLocation="http://api.facebook.com/1.0/ >> > http://api.facebook.com/1.0/facebook.xsd"> >> > >> > 102 >> > Session key invalid or no longer >> valid >> > >> > > list="true"> >> > >> > method >> > facebook.friends.get >> > >> > >> > api_key >> > [my api key] >> > >> > >> > uid >> > [ my UID ] >> > >> > >> > call_id >> > [a real call id] >> > >> > >> > sig >> > [a real sig] >> > >> > >> > v >> > 1.0 >> > >> > >> > >> >> > >> > Facebooker::Session::SessionExpired: Session key invalid or no longer >> valid >> > from >> [removed]/vendor/plugins/facebooker/lib/facebooker/parser.rb:462:in >> > `process' >> > from >> [removed]/vendor/plugins/facebooker/lib/facebooker/parser.rb:15:in >> > `parse' >> > from >> [removed]vendor/plugins/facebooker/lib/facebooker/service.rb:21:in >> > `post' >> > from >> [removed]vendor/plugins/facebooker/lib/facebooker/session.rb:466:in >> > `post' >> > from (irb):3 >> > >> > >> > >> > _______________________________________________ >> > 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 >> > > -- > Mike Mangino > http://www.elevatedrails.com > > > > > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wthomas989 at yahoo.com Wed Oct 8 16:27:28 2008 From: wthomas989 at yahoo.com (William Thomas) Date: Wed, 8 Oct 2008 13:27:28 -0700 (PDT) Subject: [Facebooker-talk] Friends.get w/out session? In-Reply-To: Message-ID: <897181.25374.qm@web58707.mail.re1.yahoo.com> I didn't think I was passing a session key to it. --- On Wed, 10/8/08, David Clements wrote: From: David Clements Subject: Re: [Facebooker-talk] Friends.get w/out session? To: "Mike Mangino" Cc: wthomas989 at yahoo.com, facebooker-talk at rubyforge.org Date: Wednesday, October 8, 2008, 9:43 AM I am not remembering the specifics.. But I believe we have seen this problem before when we pass a session key for a method that no longer requires it.? Facebook wasn't doing the smart thing and ignoring it, instead they are still trying to validate it. Dave On Wed, Oct 8, 2008 at 7:42 AM, Mike Mangino wrote: Based on my reading of this information, it sounds like this only works if the user has a valid session for your application. If the user doesn't it sounds like you will get this message. To verify that, visit your application's canvas page and then try this call immediately afterwards from script/console. Does that work? Mike On Oct 7, 2008, at 8:14 PM, William Thomas wrote: I would like to do it outside of a canvas. --- On Tue, 10/7/08, Jonathan Otto wrote: From: Jonathan Otto Subject: Re: [Facebooker-talk] Friends.get w/out session? To: wthomas989 at yahoo.com Cc: facebooker-talk at rubyforge.org Date: Tuesday, October 7, 2008, 5:36 PM Grab it from params[:fb_sig_friends] On Tue, Oct 7, 2008 at 3:08 PM, William Thomas wrote: > I'm having troubles getting an approved user's friends list without a > session key... The FB documentation says I should be able to. Has anybody > used this successfully ? > > s = Facebooker::Session.new(Facebooker.api_key, ?Facebooker.secret_key) > => # @api_key="[removed]"> >>> s.post('facebook.friends.get',{:uid => '[removed]',false) > FACEBOOKER: > FACEBOOKER: method - facebook.friends.get > FACEBOOKER: api_key - [removed] > FACEBOOKER: uid - [removed] > FACEBOOKER: call_id - [removed] > FACEBOOKER: sig - [removed] > FACEBOOKER: v - 1.0 > FACEBOOKER: > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://api.facebook.com/1.0/ > http://api.facebook.com/1.0/facebook.xsd"> > > ? 102 > ? Session key invalid or no longer valid > > ? > ? ? > ? ? ? method > ? ? ? facebook.friends.get > ? ? > ? ? > ? ? ? api_key > ? ? ? [my api key] > ? ? > ? ? > ? ? ? uid > ? ? ? [ my UID ] > ? ? > ? ? > ? ? ? call_id > ? ? ? [a real call id] > ? ? > ? ? > ? ? ? sig > ? ? ? [a real sig] > ? ? > ? ? > ? ? ? v > ? ? ? 1.0 > ? ? > ? > ? > > Facebooker::Session::SessionExpired: Session key invalid or no longer valid > ? ? from [removed]/vendor/plugins/facebooker/lib/facebooker/parser.rb:462:in > `process' > ? ? from [removed]/vendor/plugins/facebooker/lib/facebooker/parser.rb:15:in > `parse' > ? ? from [removed]vendor/plugins/facebooker/lib/facebooker/service.rb:21:in > `post' > ? ? from [removed]vendor/plugins/facebooker/lib/facebooker/session.rb:466:in > `post' > ? ? from (irb):3 > > > > _______________________________________________ > 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 -- Mike Mangino http://www.elevatedrails.com _______________________________________________ Facebooker-talk mailing list Facebooker-talk at rubyforge.org http://rubyforge.org/mailman/listinfo/facebooker-talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From digidigo at gmail.com Wed Oct 8 17:04:20 2008 From: digidigo at gmail.com (David Clements) Date: Wed, 8 Oct 2008 15:04:20 -0600 Subject: [Facebooker-talk] Friends.get w/out session? In-Reply-To: <897181.25374.qm@web58707.mail.re1.yahoo.com> References: <897181.25374.qm@web58707.mail.re1.yahoo.com> Message-ID: No I meat internally in the facebooker code. If that method used to require a session key, but now it no longer does. I might fail now. Dave On Wed, Oct 8, 2008 at 2:27 PM, William Thomas wrote: > I didn't think I was passing a session key to it. > > --- On *Wed, 10/8/08, David Clements * wrote: > > From: David Clements > Subject: Re: [Facebooker-talk] Friends.get w/out session? > To: "Mike Mangino" > Cc: wthomas989 at yahoo.com, facebooker-talk at rubyforge.org > Date: Wednesday, October 8, 2008, 9:43 AM > > > I am not remembering the specifics.. But I believe we have seen this > problem before when we pass a session key for a method that no longer > requires it. Facebook wasn't doing the smart thing and ignoring it, instead > they are still trying to validate it. > > Dave > > > On Wed, Oct 8, 2008 at 7:42 AM, Mike Mangino wrote: > >> Based on my reading of this information, it sounds like this only works if >> the user has a valid session for your application. If the user doesn't it >> sounds like you will get this message. To verify that, visit your >> application's canvas page and then try this call immediately afterwards from >> script/console. Does that work? >> >> Mike >> >> >> On Oct 7, 2008, at 8:14 PM, William Thomas wrote: >> >> I would like to do it outside of a canvas. >>> >>> --- On Tue, 10/7/08, Jonathan Otto wrote: >>> From: Jonathan Otto >>> Subject: Re: [Facebooker-talk] Friends.get w/out session? >>> To: wthomas989 at yahoo.com >>> Cc: facebooker-talk at rubyforge.org >>> Date: Tuesday, October 7, 2008, 5:36 PM >>> >>> Grab it from params[:fb_sig_friends] >>> >>> On Tue, Oct 7, 2008 at 3:08 PM, William Thomas >>> wrote: >>> > I'm having troubles getting an approved user's friends list >>> without a >>> > session key... The FB documentation says I should be able to. Has >>> anybody >>> > used this successfully ? >>> > >>> > s = Facebooker::Session.new(Facebooker.api_key, >>> Facebooker.secret_key) >>> > => #>> @secret_key="[removed]", >>> > @api_key="[removed]"> >>> >>> s.post('facebook.friends.get',{:uid => >>> '[removed]',false) >>> > FACEBOOKER: >>> > FACEBOOKER: method - facebook.friends.get >>> > FACEBOOKER: api_key - [removed] >>> > FACEBOOKER: uid - [removed] >>> > FACEBOOKER: call_id - [removed] >>> > FACEBOOKER: sig - [removed] >>> > FACEBOOKER: v - 1.0 >>> > FACEBOOKER: >> encoding="UTF-8"?> >>> > >> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >>> > xsi:schemaLocation="http://api.facebook.com/1.0/ >>> > http://api.facebook.com/1.0/facebook.xsd"> >>> > >>> > 102 >>> > Session key invalid or no longer >>> valid >>> > >>> > >> list="true"> >>> > >>> > method >>> > facebook.friends.get >>> > >>> > >>> > api_key >>> > [my api key] >>> > >>> > >>> > uid >>> > [ my UID ] >>> > >>> > >>> > call_id >>> > [a real call id] >>> > >>> > >>> > sig >>> > [a real sig] >>> > >>> > >>> > v >>> > 1.0 >>> > >>> > >>> > >>> >>> > >>> > Facebooker::Session::SessionExpired: Session key invalid or no longer >>> valid >>> > from >>> [removed]/vendor/plugins/facebooker/lib/facebooker/parser.rb:462:in >>> > `process' >>> > from >>> [removed]/vendor/plugins/facebooker/lib/facebooker/parser.rb:15:in >>> > `parse' >>> > from >>> [removed]vendor/plugins/facebooker/lib/facebooker/service.rb:21:in >>> > `post' >>> > from >>> [removed]vendor/plugins/facebooker/lib/facebooker/session.rb:466:in >>> > `post' >>> > from (irb):3 >>> > >>> > >>> > >>> > _______________________________________________ >>> > 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 >>> >> >> -- >> Mike Mangino >> http://www.elevatedrails.com >> >> >> >> >> _______________________________________________ >> 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 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mmangino at elevatedrails.com Thu Oct 9 09:09:17 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Thu, 9 Oct 2008 09:09:17 -0400 Subject: [Facebooker-talk] Friends.get w/out session? In-Reply-To: <897181.25374.qm@web58707.mail.re1.yahoo.com> References: <897181.25374.qm@web58707.mail.re1.yahoo.com> Message-ID: <5786F3C8-7038-4514-A688-3BFBECBC62C4@elevatedrails.com> The last parameter in the call to Session#post controls whether or not the signature gets included. Since it is set to false, it isn't being included. Have you found anyone who can make this work using the API? Have you tried immediately after making an http request to your app as that user? Mike On Oct 8, 2008, at 4:27 PM, William Thomas wrote: > I didn't think I was passing a session key to it. > > --- On Wed, 10/8/08, David Clements wrote: > From: David Clements > Subject: Re: [Facebooker-talk] Friends.get w/out session? > To: "Mike Mangino" > Cc: wthomas989 at yahoo.com, facebooker-talk at rubyforge.org > Date: Wednesday, October 8, 2008, 9:43 AM > > I am not remembering the specifics.. But I believe we have seen this > problem before when we pass a session key for a method that no > longer requires it. Facebook wasn't doing the smart thing and > ignoring it, instead they are still trying to validate it. > > Dave > > > On Wed, Oct 8, 2008 at 7:42 AM, Mike Mangino > wrote: > Based on my reading of this information, it sounds like this only > works if the user has a valid session for your application. If the > user doesn't it sounds like you will get this message. To verify > that, visit your application's canvas page and then try this call > immediately afterwards from script/console. Does that work? > > Mike > > > On Oct 7, 2008, at 8:14 PM, William Thomas wrote: > > I would like to do it outside of a canvas. > > --- On Tue, 10/7/08, Jonathan Otto wrote: > From: Jonathan Otto > Subject: Re: [Facebooker-talk] Friends.get w/out session? > To: wthomas989 at yahoo.com > Cc: facebooker-talk at rubyforge.org > Date: Tuesday, October 7, 2008, 5:36 PM > > Grab it from params[:fb_sig_friends] > > On Tue, Oct 7, 2008 at 3:08 PM, William Thomas > wrote: > > I'm having troubles getting an approved user's friends list > without a > > session key... The FB documentation says I should be able to. Has > anybody > > used this successfully ? > > > > s = Facebooker::Session.new(Facebooker.api_key, > Facebooker.secret_key) > > => # @secret_key="[removed]", > > @api_key="[removed]"> > >>> s.post('facebook.friends.get',{:uid => > '[removed]',false) > > FACEBOOKER: > > FACEBOOKER: method - facebook.friends.get > > FACEBOOKER: api_key - [removed] > > FACEBOOKER: uid - [removed] > > FACEBOOKER: call_id - [removed] > > FACEBOOKER: sig - [removed] > > FACEBOOKER: v - 1.0 > > FACEBOOKER: encoding="UTF-8"?> > > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > > xsi:schemaLocation="http://api.facebook.com/1.0/ > > http://api.facebook.com/1.0/facebook.xsd"> > > > > 102 > > Session key invalid or no longer > valid > > > > list="true"> > > > > method > > facebook.friends.get > > > > > > api_key > > [my api key] > > > > > > uid > > [ my UID ] > > > > > > call_id > > [a real call id] > > > > > > sig > > [a real sig] > > > > > > v > > 1.0 > > > > > > > > > > > Facebooker::Session::SessionExpired: Session key invalid or no > longer > valid > > from > [removed]/vendor/plugins/facebooker/lib/facebooker/parser.rb:462:in > > `process' > > from > [removed]/vendor/plugins/facebooker/lib/facebooker/parser.rb:15:in > > `parse' > > from > [removed]vendor/plugins/facebooker/lib/facebooker/service.rb:21:in > > `post' > > from > [removed]vendor/plugins/facebooker/lib/facebooker/session.rb:466:in > > `post' > > from (irb):3 > > > > > > > > _______________________________________________ > > 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 > > -- > Mike Mangino > http://www.elevatedrails.com > > > > > _______________________________________________ > 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 -- Mike Mangino http://www.elevatedrails.com From wthomas989 at yahoo.com Thu Oct 9 11:20:31 2008 From: wthomas989 at yahoo.com (William Thomas) Date: Thu, 9 Oct 2008 08:20:31 -0700 (PDT) Subject: [Facebooker-talk] Friends.get w/out session? In-Reply-To: <5786F3C8-7038-4514-A688-3BFBECBC62C4@elevatedrails.com> Message-ID: <975577.55254.qm@web58706.mail.re1.yahoo.com> This thread claims people have http://forum.developers.facebook.com/viewtopic.php?id=20358 --- On Thu, 10/9/08, Mike Mangino wrote: From: Mike Mangino Subject: Re: [Facebooker-talk] Friends.get w/out session? To: wthomas989 at yahoo.com Cc: facebooker-talk at rubyforge.org Date: Thursday, October 9, 2008, 8:09 AM The last parameter in the call to Session#post controls whether or not the signature gets included. Since it is set to false, it isn't being included. Have you found anyone who can make this work using the API? Have you tried immediately after making an http request to your app as that user? Mike On Oct 8, 2008, at 4:27 PM, William Thomas wrote: > I didn't think I was passing a session key to it. > > --- On Wed, 10/8/08, David Clements wrote: > From: David Clements > Subject: Re: [Facebooker-talk] Friends.get w/out session? > To: "Mike Mangino" > Cc: wthomas989 at yahoo.com, facebooker-talk at rubyforge.org > Date: Wednesday, October 8, 2008, 9:43 AM > > I am not remembering the specifics.. But I believe we have seen this > problem before when we pass a session key for a method that no > longer requires it. Facebook wasn't doing the smart thing and > ignoring it, instead they are still trying to validate it. > > Dave > > > On Wed, Oct 8, 2008 at 7:42 AM, Mike Mangino > wrote: > Based on my reading of this information, it sounds like this only > works if the user has a valid session for your application. If the > user doesn't it sounds like you will get this message. To verify > that, visit your application's canvas page and then try this call > immediately afterwards from script/console. Does that work? > > Mike > > > On Oct 7, 2008, at 8:14 PM, William Thomas wrote: > > I would like to do it outside of a canvas. > > --- On Tue, 10/7/08, Jonathan Otto wrote: > From: Jonathan Otto > Subject: Re: [Facebooker-talk] Friends.get w/out session? > To: wthomas989 at yahoo.com > Cc: facebooker-talk at rubyforge.org > Date: Tuesday, October 7, 2008, 5:36 PM > > Grab it from params[:fb_sig_friends] > > On Tue, Oct 7, 2008 at 3:08 PM, William Thomas > wrote: > > I'm having troubles getting an approved user's friends list > without a > > session key... The FB documentation says I should be able to. Has > anybody > > used this successfully ? > > > > s = Facebooker::Session.new(Facebooker.api_key, > Facebooker.secret_key) > > => # @secret_key="[removed]", > > @api_key="[removed]"> > >>> s.post('facebook.friends.get',{:uid => > '[removed]',false) > > FACEBOOKER: > > FACEBOOKER: method - facebook.friends.get > > FACEBOOKER: api_key - [removed] > > FACEBOOKER: uid - [removed] > > FACEBOOKER: call_id - [removed] > > FACEBOOKER: sig - [removed] > > FACEBOOKER: v - 1.0 > > FACEBOOKER: encoding="UTF-8"?> > > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > > xsi:schemaLocation="http://api.facebook.com/1.0/ > > http://api.facebook.com/1.0/facebook.xsd"> > > > > 102 > > Session key invalid or no longer > valid > > > > list="true"> > > > > method > > facebook.friends.get > > > > > > api_key > > [my api key] > > > > > > uid > > [ my UID ] > > > > > > call_id > > [a real call id] > > > > > > sig > > [a real sig] > > > > > > v > > 1.0 > > > > > > > > > > > Facebooker::Session::SessionExpired: Session key invalid or no > longer > valid > > from > [removed]/vendor/plugins/facebooker/lib/facebooker/parser.rb:462:in > > `process' > > from > [removed]/vendor/plugins/facebooker/lib/facebooker/parser.rb:15:in > > `parse' > > from > [removed]vendor/plugins/facebooker/lib/facebooker/service.rb:21:in > > `post' > > from > [removed]vendor/plugins/facebooker/lib/facebooker/session.rb:466:in > > `post' > > from (irb):3 > > > > > > > > _______________________________________________ > > 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 > > -- > Mike Mangino > http://www.elevatedrails.com > > > > > _______________________________________________ > 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 -- Mike Mangino http://www.elevatedrails.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From vincentchu at gmail.com Thu Oct 9 16:04:05 2008 From: vincentchu at gmail.com (vincent chu) Date: Thu, 9 Oct 2008 13:04:05 -0700 Subject: [Facebooker-talk] Mixing Facebooker into an existing site Message-ID: Hi all -- I'm adding a facebook plugin to an existing website and would like to use data stored in existing models to display content on a facebook application. I would like the rest of the site to run normally (i.e., in NON-facebook mode), but I would like to define several views which the site would handle using facebooker / facebooker_authentication. Here's my conundrum (and apologies if this is a really simple question): how do I configure my site so that facebooker will only handle certain views? If I install facebooker, then my site is broken because the installation make the site handle all views as facebook views. Thanks, Vince -- Vincent Chu Department of Applied Physics Geballe Laboratory of Advanced Materials McCullough Bldg. 318 476 Lomita Mall Stanford, CA, 94305 vchu AT post.harvard.edu vincentchu AT gmail.com http://www.stanford.edu/~vincentc (homepage, updated sporadically) Consider this: "The smallest positive integer not definable in under eleven words." From mmangino at elevatedrails.com Thu Oct 9 16:25:11 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Thu, 9 Oct 2008 16:25:11 -0400 Subject: [Facebooker-talk] Mixing Facebooker into an existing site In-Reply-To: References: Message-ID: On Oct 9, 2008, at 4:04 PM, vincent chu wrote: > Hi all -- > > I'm adding a facebook plugin to an existing website and would like to > use data stored in existing models to display content on a facebook > application. I would like the rest of the site to run normally (i.e., > in NON-facebook mode), but I would like to define several views which > the site would handle using facebooker / facebooker_authentication. > > Here's my conundrum (and apologies if this is a really simple > question): how do I configure my site so that facebooker will only > handle certain views? If I install facebooker, then my site is broken > because the installation make the site handle all views as facebook > views. > What do you mean the site is broken? For non-facebook requests the normal process should be followed. If a request comes from Facebook, it will try to render the .fbml.erb template instead. Mike > Thanks, > > Vince > > -- > Vincent Chu > Department of Applied Physics > Geballe Laboratory of Advanced Materials > McCullough Bldg. 318 > 476 Lomita Mall > Stanford, CA, 94305 > > vchu AT post.harvard.edu > vincentchu AT gmail.com > > http://www.stanford.edu/~vincentc (homepage, updated sporadically) > > Consider this: > "The smallest positive integer not definable in under eleven words." > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk -- Mike Mangino http://www.elevatedrails.com From vincentchu at gmail.com Thu Oct 9 16:44:42 2008 From: vincentchu at gmail.com (vincent chu) Date: Thu, 9 Oct 2008 13:44:42 -0700 Subject: [Facebooker-talk] Mixing Facebooker into an existing site In-Reply-To: References: Message-ID: Mike -- I think I'm beginning to understand -- I have a view that gets called when requests come in from facebook profile tabs; since fbml and html are so similar, I had just modified my normal view to add in a few facebook tags. However, the facebook profile tab is treated as a normal HTML view. When I installed facebooker, profile tab views are now treated as facebook views, leading to the "breaking" of my app. I'd really rather not treat the profile tab views as facebooker views because the profile tab views are really only a slight modification of an existing view -- is there any way to turn off the filtering for this single view? Thanks, Vince On Thu, Oct 9, 2008 at 1:25 PM, Mike Mangino wrote: > > On Oct 9, 2008, at 4:04 PM, vincent chu wrote: > >> Hi all -- >> >> I'm adding a facebook plugin to an existing website and would like to >> use data stored in existing models to display content on a facebook >> application. I would like the rest of the site to run normally (i.e., >> in NON-facebook mode), but I would like to define several views which >> the site would handle using facebooker / facebooker_authentication. >> >> Here's my conundrum (and apologies if this is a really simple >> question): how do I configure my site so that facebooker will only >> handle certain views? If I install facebooker, then my site is broken >> because the installation make the site handle all views as facebook >> views. >> > > What do you mean the site is broken? For non-facebook requests the normal > process should be followed. If a request comes from Facebook, it will try to > render the .fbml.erb template instead. > > Mike > > >> Thanks, >> >> Vince >> >> -- >> Vincent Chu >> Department of Applied Physics >> Geballe Laboratory of Advanced Materials >> McCullough Bldg. 318 >> 476 Lomita Mall >> Stanford, CA, 94305 >> >> vchu AT post.harvard.edu >> vincentchu AT gmail.com >> >> http://www.stanford.edu/~vincentc (homepage, updated sporadically) >> >> Consider this: >> "The smallest positive integer not definable in under eleven words." >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/facebooker-talk > > -- > Mike Mangino > http://www.elevatedrails.com > > > > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > -- Vincent Chu Department of Applied Physics Geballe Laboratory of Advanced Materials McCullough Bldg. 318 476 Lomita Mall Stanford, CA, 94305 vchu AT post.harvard.edu vincentchu AT gmail.com http://www.stanford.edu/~vincentc (homepage, updated sporadically) Consider this: "The smallest positive integer not definable in under eleven words." From mmangino at elevatedrails.com Thu Oct 9 17:32:26 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Thu, 9 Oct 2008 17:32:26 -0400 Subject: [Facebooker-talk] Mixing Facebooker into an existing site In-Reply-To: References: Message-ID: On Oct 9, 2008, at 4:44 PM, vincent chu wrote: > Mike -- > > I think I'm beginning to understand -- I have a view that gets called > when requests come in from facebook profile tabs; since fbml and html > are so similar, I had just modified my normal view to add in a few > facebook tags. However, the facebook profile tab is treated as a > normal HTML view. When I installed facebooker, profile tab views are > now treated as facebook views, leading to the "breaking" of my app. I don't follow this. Is the view for profile tabs only called from Facebook, or from both Facebook and non-facebook? In either case, Facebook templates should be .fbml.erb templates. What do you mean by "treated as facebook views" ? > > > I'd really rather not treat the profile tab views as facebooker views > because the profile tab views are really only a slight modification of > an existing view -- is there any way to turn off the filtering for > this single view? Can you explain what you want to happen? What filtering are you talking about? Mike > > > Thanks, > > Vince > > > On Thu, Oct 9, 2008 at 1:25 PM, Mike Mangino > wrote: >> >> On Oct 9, 2008, at 4:04 PM, vincent chu wrote: >> >>> Hi all -- >>> >>> I'm adding a facebook plugin to an existing website and would like >>> to >>> use data stored in existing models to display content on a facebook >>> application. I would like the rest of the site to run normally >>> (i.e., >>> in NON-facebook mode), but I would like to define several views >>> which >>> the site would handle using facebooker / facebooker_authentication. >>> >>> Here's my conundrum (and apologies if this is a really simple >>> question): how do I configure my site so that facebooker will only >>> handle certain views? If I install facebooker, then my site is >>> broken >>> because the installation make the site handle all views as facebook >>> views. >>> >> >> What do you mean the site is broken? For non-facebook requests the >> normal >> process should be followed. If a request comes from Facebook, it >> will try to >> render the .fbml.erb template instead. >> >> Mike >> >> >>> Thanks, >>> >>> Vince >>> >>> -- >>> Vincent Chu >>> Department of Applied Physics >>> Geballe Laboratory of Advanced Materials >>> McCullough Bldg. 318 >>> 476 Lomita Mall >>> Stanford, CA, 94305 >>> >>> vchu AT post.harvard.edu >>> vincentchu AT gmail.com >>> >>> http://www.stanford.edu/~vincentc (homepage, updated sporadically) >>> >>> Consider this: >>> "The smallest positive integer not definable in under eleven words." >>> _______________________________________________ >>> Facebooker-talk mailing list >>> Facebooker-talk at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/facebooker-talk >> >> -- >> Mike Mangino >> http://www.elevatedrails.com >> >> >> >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/facebooker-talk >> > > > > -- > Vincent Chu > Department of Applied Physics > Geballe Laboratory of Advanced Materials > McCullough Bldg. 318 > 476 Lomita Mall > Stanford, CA, 94305 > > vchu AT post.harvard.edu > vincentchu AT gmail.com > > http://www.stanford.edu/~vincentc (homepage, updated sporadically) > > Consider this: > "The smallest positive integer not definable in under eleven words." -- Mike Mangino http://www.elevatedrails.com From wthomas989 at yahoo.com Fri Oct 10 11:54:24 2008 From: wthomas989 at yahoo.com (William Thomas) Date: Fri, 10 Oct 2008 08:54:24 -0700 (PDT) Subject: [Facebooker-talk] Mixing Facebooker into an existing site In-Reply-To: Message-ID: <524931.49567.qm@web58704.mail.re1.yahoo.com> Agreed- not sure what is going on, here is my take IMO, you should keep your "normal views" (I think you mean the ones you're hosting and viewing from your domain) in .html.erb files , and the ones that facebook requests (hosted on your site but viewed from facebook) in .fbml.erb. If you have similarities you should break those out into something reusable like a partial, a helper, or a rails-cell --- On Thu, 10/9/08, Mike Mangino wrote: From: Mike Mangino Subject: Re: [Facebooker-talk] Mixing Facebooker into an existing site To: vchu at post.harvard.edu Cc: facebooker-talk at rubyforge.org Date: Thursday, October 9, 2008, 4:32 PM On Oct 9, 2008, at 4:44 PM, vincent chu wrote: > Mike -- > > I think I'm beginning to understand -- I have a view that gets called > when requests come in from facebook profile tabs; since fbml and html > are so similar, I had just modified my normal view to add in a few > facebook tags. However, the facebook profile tab is treated as a > normal HTML view. When I installed facebooker, profile tab views are > now treated as facebook views, leading to the "breaking" of my app. I don't follow this. Is the view for profile tabs only called from Facebook, or from both Facebook and non-facebook? In either case, Facebook templates should be .fbml.erb templates. What do you mean by "treated as facebook views" ? > > > I'd really rather not treat the profile tab views as facebooker views > because the profile tab views are really only a slight modification of > an existing view -- is there any way to turn off the filtering for > this single view? Can you explain what you want to happen? What filtering are you talking about? Mike > > > Thanks, > > Vince > > > On Thu, Oct 9, 2008 at 1:25 PM, Mike Mangino > wrote: >> >> On Oct 9, 2008, at 4:04 PM, vincent chu wrote: >> >>> Hi all -- >>> >>> I'm adding a facebook plugin to an existing website and would like >>> to >>> use data stored in existing models to display content on a facebook >>> application. I would like the rest of the site to run normally >>> (i.e., >>> in NON-facebook mode), but I would like to define several views >>> which >>> the site would handle using facebooker / facebooker_authentication. >>> >>> Here's my conundrum (and apologies if this is a really simple >>> question): how do I configure my site so that facebooker will only >>> handle certain views? If I install facebooker, then my site is >>> broken >>> because the installation make the site handle all views as facebook >>> views. >>> >> >> What do you mean the site is broken? For non-facebook requests the >> normal >> process should be followed. If a request comes from Facebook, it >> will try to >> render the .fbml.erb template instead. >> >> Mike >> >> >>> Thanks, >>> >>> Vince >>> >>> -- >>> Vincent Chu >>> Department of Applied Physics >>> Geballe Laboratory of Advanced Materials >>> McCullough Bldg. 318 >>> 476 Lomita Mall >>> Stanford, CA, 94305 >>> >>> vchu AT post.harvard.edu >>> vincentchu AT gmail.com >>> >>> http://www.stanford.edu/~vincentc (homepage, updated sporadically) >>> >>> Consider this: >>> "The smallest positive integer not definable in under eleven words." >>> _______________________________________________ >>> Facebooker-talk mailing list >>> Facebooker-talk at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/facebooker-talk >> >> -- >> Mike Mangino >> http://www.elevatedrails.com >> >> >> >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/facebooker-talk >> > > > > -- > Vincent Chu > Department of Applied Physics > Geballe Laboratory of Advanced Materials > McCullough Bldg. 318 > 476 Lomita Mall > Stanford, CA, 94305 > > vchu AT post.harvard.edu > vincentchu AT gmail.com > > http://www.stanford.edu/~vincentc (homepage, updated sporadically) > > Consider this: > "The smallest positive integer not definable in under eleven words." -- Mike Mangino http://www.elevatedrails.com _______________________________________________ Facebooker-talk mailing list Facebooker-talk at rubyforge.org http://rubyforge.org/mailman/listinfo/facebooker-talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From vincentchu at gmail.com Sun Oct 12 16:41:14 2008 From: vincentchu at gmail.com (vincent chu) Date: Sun, 12 Oct 2008 13:41:14 -0700 Subject: [Facebooker-talk] Mixing Facebooker into an existing site In-Reply-To: <524931.49567.qm@web58704.mail.re1.yahoo.com> References: <524931.49567.qm@web58704.mail.re1.yahoo.com> Message-ID: Hi -- Thanks for your help and sorry for being ambiguous. In greater detail: - I have a website, written in rails, that faces the outside world (i.e., people go to "mysite.com" without being members of facebook, or even interacting with facebook). This is already written and cannot change very much. - I'm working on a facebook app which will use data from models in "mysite.com"; I'd like to write a single controller that will handle requests coming in from facebook (from profile tab views, and from application canvas pages). I've set it up so that: callbackurl = mysite.com/facebook/ canvas page = apps.facebook.com/mysiteapp/ - Ideally, I'd like the rest of my site to be ignorant of the facebooker plugin and run as if it weren't there (like it does now); I'd only want to facebooker plugin to do its magic only for those views that have something to do with facebook. After I installed the facebooker plugin to my site, I found that facebooker had altered the behavior of controllers/views that I didn't want. For instance, I was using "bundle-fu" to bundle all of my stylesheets/javascript together on normal site views. I now find that my application outputs: wrote: > Agreed- not sure what is going on, here is my take > > IMO, you should keep your "normal views" (I think you mean the ones you're > hosting and viewing from your domain) in .html.erb files , and the > ones that facebook requests (hosted on your site but viewed from facebook) > in .fbml.erb. > > If you have similarities you should break those out into something reusable > like a partial, a helper, or a rails-cell > > --- On Thu, 10/9/08, Mike Mangino wrote: > > From: Mike Mangino > Subject: Re: [Facebooker-talk] Mixing Facebooker into an existing site > To: vchu at post.harvard.edu > Cc: facebooker-talk at rubyforge.org > Date: Thursday, October 9, 2008, 4:32 PM > > On Oct 9, 2008, at 4:44 PM, vincent chu wrote: > >> Mike -- >> >> I think I'm beginning to understand -- I have a view that gets called >> when requests come in from facebook profile tabs; since fbml and html >> are so similar, I had just modified my normal view to add in a few >> facebook tags. However, the > facebook profile tab is treated as a >> normal HTML view. When I installed facebooker, profile tab views are >> now treated as facebook views, leading to the "breaking" of my > app. > > I don't follow this. Is the view for profile tabs only called from > Facebook, or from both Facebook and non-facebook? In either case, > Facebook templates should be .fbml.erb templates. > > What do you mean by "treated as facebook views" ? > >> >> >> I'd really rather not treat the profile tab views as facebooker views >> because the profile tab views are really only a slight modification of >> an existing view -- is there any way to turn off the filtering for >> this single view? > > Can you explain what you want to happen? What filtering are you > talking about? > > Mike > >> >> >> Thanks, >> >> Vince >> >> >> On Thu, Oct 9, 2008 at 1:25 PM, Mike > Mangino > > > wrote: >>> >>> On Oct 9, 2008, at 4:04 PM, vincent chu wrote: >>> >>>> Hi all -- >>>> >>>> I'm adding a facebook plugin to an existing website and would > like >>>> to >>>> use data stored in existing models to display content on a > facebook >>>> application. I would like the rest of the site to run normally >>>> (i.e., >>>> in NON-facebook mode), but I would like to define several views >>>> which >>>> the site would handle using facebooker / > facebooker_authentication. >>>> >>>> Here's my conundrum (and apologies if this is a really simple >>>> question): how do I configure my site so that facebooker will only >>>> handle certain views? If I install facebooker, then my site is >>>> > broken >>>> because the installation make the site handle all views as > facebook >>>> views. >>>> >>> >>> What do you mean the site is broken? For non-facebook requests the >>> normal >>> process should be followed. If a request comes from Facebook, it >>> will try to >>> render the .fbml.erb template instead. >>> >>> Mike >>> >>> >>>> Thanks, >>>> >>>> Vince >>>> >>>> -- >>>> Vincent Chu >>>> Department of Applied Physics >>>> Geballe Laboratory of Advanced Materials >>>> McCullough Bldg. 318 >>>> 476 Lomita Mall >>>> Stanford, CA, 94305 >>>> >>>> vchu AT post.harvard.edu >>>> vincentchu AT gmail.com >>>> >>>> http://www.stanford.edu/~vincentc (homepage, updated > sporadically) >>>> >>>> Consider this: >>>> "The smallest positive integer not definable in under eleven > words." >>>> _______________________________________________ >>>> Facebooker-talk mailing list >>>> Facebooker-talk at rubyforge.org >>>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>> >>> -- >>> Mike Mangino >>> http://www.elevatedrails.com >>> >>> >>> >>> _______________________________________________ >>> Facebooker-talk mailing list >>> Facebooker-talk at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>> >> >> >> >> -- >> Vincent Chu >> Department of Applied Physics >> Geballe Laboratory of Advanced Materials >> McCullough Bldg. 318 >> 476 Lomita Mall >> Stanford, CA, 94305 >> >> > vchu AT post.harvard.edu >> vincentchu AT gmail.com >> >> http://www.stanford.edu/~vincentc (homepage, updated sporadically) >> >> Consider this: >> "The smallest positive integer not definable in under eleven > words." > > -- > Mike Mangino > http://www.elevatedrails.com > > > > _______________________________________________ > 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 > > -- Vincent Chu Department of Applied Physics Geballe Laboratory of Advanced Materials McCullough Bldg. 318 476 Lomita Mall Stanford, CA, 94305 vchu AT post.harvard.edu vincentchu AT gmail.com http://www.stanford.edu/~vincentc (homepage, updated sporadically) Consider this: "The smallest positive integer not definable in under eleven words." From jnylund at yahoo.com Sun Oct 12 18:57:24 2008 From: jnylund at yahoo.com (Joel Nylund) Date: Sun, 12 Oct 2008 18:57:24 -0400 Subject: [Facebooker-talk] Mixing Facebooker into an existing site In-Reply-To: References: <524931.49567.qm@web58704.mail.re1.yahoo.com> Message-ID: There was a patch in feb (see the mail archives) from Shawn Van Ittersum submitted (but I dont think it ever got in cause of no test cases). It allowed you to put a prefix for facebook namespace (which can be a controller if you want) I have been using it in production since then to achieve the effect you are looking for. Not sure it will work on the current facebooker codebase, but it might be worth a try: When I use that patch I set: callback_url: mydomain.com and: ENV['FACEBOOKER_SANDBOX_NAMESPACE'] = '/face' which sets sends all facebook requests to my "face" controller. and in facebook I set my callback url to: mydomain.com/face/ the rest of my app works normally. Joel On Oct 12, 2008, at 4:41 PM, vincent chu wrote: > Hi -- > > Thanks for your help and sorry for being ambiguous. In greater detail: > > - I have a website, written in rails, that faces the outside world > (i.e., people go to "mysite.com" without being members of facebook, or > even interacting with facebook). This is already written and cannot > change very much. > > - I'm working on a facebook app which will use data from models in > "mysite.com"; I'd like to write a single controller that will handle > requests coming in from facebook (from profile tab views, and from > application canvas pages). I've set it up so that: > > callbackurl = mysite.com/facebook/ > canvas page = apps.facebook.com/mysiteapp/ > > - Ideally, I'd like the rest of my site to be ignorant of the > facebooker plugin and run as if it weren't there (like it does now); > I'd only want to facebooker plugin to do its magic only for those > views that have something to do with facebook. > > After I installed the facebooker plugin to my site, I found that > facebooker had altered the behavior of controllers/views that I didn't > want. For instance, I was using "bundle-fu" to bundle all of my > stylesheets/javascript together on normal site views. I now find that > my application outputs: > > ... > > instead of > > > like it did, before the facebooker plugin was installed. Seems like > facebooker has altered the environment of the rails app -- is there > anyway to turn this behavior off, except for controllers/views which > actually handle requests from facebook? > > Thanks for all of the help, > > Vince > > > > > > > > On Fri, Oct 10, 2008 at 8:54 AM, William Thomas > wrote: >> Agreed- not sure what is going on, here is my take >> >> IMO, you should keep your "normal views" (I think you mean the ones >> you're >> hosting and viewing from your domain) in .html.erb files , >> and the >> ones that facebook requests (hosted on your site but viewed from >> facebook) >> in .fbml.erb. >> >> If you have similarities you should break those out into something >> reusable >> like a partial, a helper, or a rails-cell >> >> --- On Thu, 10/9/08, Mike Mangino wrote: >> >> From: Mike Mangino >> Subject: Re: [Facebooker-talk] Mixing Facebooker into an existing >> site >> To: vchu at post.harvard.edu >> Cc: facebooker-talk at rubyforge.org >> Date: Thursday, October 9, 2008, 4:32 PM >> >> On Oct 9, 2008, at 4:44 PM, vincent chu wrote: >> >>> Mike -- >>> >>> I think I'm beginning to understand -- I have a view that gets >>> called >>> when requests come in from facebook profile tabs; since fbml and >>> html >>> are so similar, I had just modified my normal view to add in a few >>> facebook tags. However, the >> facebook profile tab is treated as a >>> normal HTML view. When I installed facebooker, profile tab views are >>> now treated as facebook views, leading to the "breaking" of my >> app. >> >> I don't follow this. Is the view for profile tabs only called from >> Facebook, or from both Facebook and non-facebook? In either case, >> Facebook templates should be .fbml.erb templates. >> >> What do you mean by "treated as facebook views" ? >> >>> >>> >>> I'd really rather not treat the profile tab views as facebooker >>> views >>> because the profile tab views are really only a slight >>> modification of >>> an existing view -- is there any way to turn off the filtering for >>> this single view? >> >> Can you explain what you want to happen? What filtering are you >> talking about? >> >> Mike >> >>> >>> >>> Thanks, >>> >>> Vince >>> >>> >>> On Thu, Oct 9, 2008 at 1:25 PM, Mike >> Mangino >> >>> wrote: >>>> >>>> On Oct 9, 2008, at 4:04 PM, vincent chu wrote: >>>> >>>>> Hi all -- >>>>> >>>>> I'm adding a facebook plugin to an existing website and would >> like >>>>> to >>>>> use data stored in existing models to display content on a >> facebook >>>>> application. I would like the rest of the site to run normally >>>>> (i.e., >>>>> in NON-facebook mode), but I would like to define several views >>>>> which >>>>> the site would handle using facebooker / >> facebooker_authentication. >>>>> >>>>> Here's my conundrum (and apologies if this is a really simple >>>>> question): how do I configure my site so that facebooker will only >>>>> handle certain views? If I install facebooker, then my site is >>>>> >> broken >>>>> because the installation make the site handle all views as >> facebook >>>>> views. >>>>> >>>> >>>> What do you mean the site is broken? For non-facebook requests the >>>> normal >>>> process should be followed. If a request comes from Facebook, it >>>> will try to >>>> render the .fbml.erb template instead. >>>> >>>> Mike >>>> >>>> >>>>> Thanks, >>>>> >>>>> Vince >>>>> >>>>> -- >>>>> Vincent Chu >>>>> Department of Applied Physics >>>>> Geballe Laboratory of Advanced Materials >>>>> McCullough Bldg. 318 >>>>> 476 Lomita Mall >>>>> Stanford, CA, 94305 >>>>> >>>>> vchu AT post.harvard.edu >>>>> vincentchu AT gmail.com >>>>> >>>>> http://www.stanford.edu/~vincentc (homepage, updated >> sporadically) >>>>> >>>>> Consider this: >>>>> "The smallest positive integer not definable in under eleven >> words." >>>>> _______________________________________________ >>>>> Facebooker-talk mailing list >>>>> Facebooker-talk at rubyforge.org >>>>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>>> >>>> -- >>>> Mike Mangino >>>> http://www.elevatedrails.com >>>> >>>> >>>> >>>> _______________________________________________ >>>> Facebooker-talk mailing list >>>> Facebooker-talk at rubyforge.org >>>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>>> >>> >>> >>> >>> -- >>> Vincent Chu >>> Department of Applied Physics >>> Geballe Laboratory of Advanced Materials >>> McCullough Bldg. 318 >>> 476 Lomita Mall >>> Stanford, CA, 94305 >>> >>> >> vchu AT post.harvard.edu >>> vincentchu AT gmail.com >>> >>> http://www.stanford.edu/~vincentc (homepage, updated sporadically) >>> >>> Consider this: >>> "The smallest positive integer not definable in under eleven >> words." >> >> -- >> Mike Mangino >> http://www.elevatedrails.com >> >> >> >> _______________________________________________ >> 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 >> >> > > > > -- > Vincent Chu > Department of Applied Physics > Geballe Laboratory of Advanced Materials > McCullough Bldg. 318 > 476 Lomita Mall > Stanford, CA, 94305 > > vchu AT post.harvard.edu > vincentchu AT gmail.com > > http://www.stanford.edu/~vincentc (homepage, updated sporadically) > > Consider this: > "The smallest positive integer not definable in under eleven words." > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk From digidigo at gmail.com Sun Oct 12 20:41:57 2008 From: digidigo at gmail.com (David Clements) Date: Sun, 12 Oct 2008 18:41:57 -0600 Subject: [Facebooker-talk] Mixing Facebooker into an existing site In-Reply-To: References: <524931.49567.qm@web58704.mail.re1.yahoo.com> Message-ID: The specific behavior mentioned happens because Facebooker requires the use of the rails asset_host setting. I think the specific issue you are running into is that Facebooker assumes that your callback_url will be set to mysite.com and not mysite.com/facebook I believe you can override this by setting your asset host and then facebooker won't override it. We have this in our produciton.rb ActionController::Base.asset_host = "http://assets%d.meetingwave.com" I know it seems as though Facebooker is being invasive and changing lots of behavoir but this is one of the more invasive things, I think everything else works right out of the box. Dave On Sun, Oct 12, 2008 at 4:57 PM, Joel Nylund wrote: > There was a patch in feb (see the mail archives) from Shawn Van Ittersum > submitted (but I dont think it ever got in cause of no test cases). > > It allowed you to put a prefix for facebook namespace (which can be a > controller if you want) > > I have been using it in production since then to achieve the effect you are > looking for. > > Not sure it will work on the current facebooker codebase, but it might be > worth a try: > > When I use that patch I set: > > callback_url: mydomain.com > and: > ENV['FACEBOOKER_SANDBOX_NAMESPACE'] = '/face' > > which sets sends all facebook requests to my "face" controller. > > and in facebook I set my callback url to: > mydomain.com/face/ > > the rest of my app works normally. > > Joel > > > > On Oct 12, 2008, at 4:41 PM, vincent chu wrote: > > Hi -- >> >> Thanks for your help and sorry for being ambiguous. In greater detail: >> >> - I have a website, written in rails, that faces the outside world >> (i.e., people go to "mysite.com" without being members of facebook, or >> even interacting with facebook). This is already written and cannot >> change very much. >> >> - I'm working on a facebook app which will use data from models in >> "mysite.com"; I'd like to write a single controller that will handle >> requests coming in from facebook (from profile tab views, and from >> application canvas pages). I've set it up so that: >> >> callbackurl = mysite.com/facebook/ >> canvas page = apps.facebook.com/mysiteapp/ >> >> - Ideally, I'd like the rest of my site to be ignorant of the >> facebooker plugin and run as if it weren't there (like it does now); >> I'd only want to facebooker plugin to do its magic only for those >> views that have something to do with facebook. >> >> After I installed the facebooker plugin to my site, I found that >> facebooker had altered the behavior of controllers/views that I didn't >> want. For instance, I was using "bundle-fu" to bundle all of my >> stylesheets/javascript together on normal site views. I now find that >> my application outputs: >> >> > ... >> >> instead of >> >> > >> like it did, before the facebooker plugin was installed. Seems like >> facebooker has altered the environment of the rails app -- is there >> anyway to turn this behavior off, except for controllers/views which >> actually handle requests from facebook? >> >> Thanks for all of the help, >> >> Vince >> >> >> >> >> >> >> >> On Fri, Oct 10, 2008 at 8:54 AM, William Thomas >> wrote: >> >>> Agreed- not sure what is going on, here is my take >>> >>> IMO, you should keep your "normal views" (I think you mean the ones >>> you're >>> hosting and viewing from your domain) in .html.erb files , and >>> the >>> ones that facebook requests (hosted on your site but viewed from >>> facebook) >>> in .fbml.erb. >>> >>> If you have similarities you should break those out into something >>> reusable >>> like a partial, a helper, or a rails-cell >>> >>> --- On Thu, 10/9/08, Mike Mangino wrote: >>> >>> From: Mike Mangino >>> Subject: Re: [Facebooker-talk] Mixing Facebooker into an existing site >>> To: vchu at post.harvard.edu >>> Cc: facebooker-talk at rubyforge.org >>> Date: Thursday, October 9, 2008, 4:32 PM >>> >>> On Oct 9, 2008, at 4:44 PM, vincent chu wrote: >>> >>> Mike -- >>>> >>>> I think I'm beginning to understand -- I have a view that gets called >>>> when requests come in from facebook profile tabs; since fbml and html >>>> are so similar, I had just modified my normal view to add in a few >>>> facebook tags. However, the >>>> >>> facebook profile tab is treated as a >>> >>>> normal HTML view. When I installed facebooker, profile tab views are >>>> now treated as facebook views, leading to the "breaking" of my >>>> >>> app. >>> >>> I don't follow this. Is the view for profile tabs only called from >>> Facebook, or from both Facebook and non-facebook? In either case, >>> Facebook templates should be .fbml.erb templates. >>> >>> What do you mean by "treated as facebook views" ? >>> >>> >>>> >>>> I'd really rather not treat the profile tab views as facebooker views >>>> because the profile tab views are really only a slight modification of >>>> an existing view -- is there any way to turn off the filtering for >>>> this single view? >>>> >>> >>> Can you explain what you want to happen? What filtering are you >>> talking about? >>> >>> Mike >>> >>> >>>> >>>> Thanks, >>>> >>>> Vince >>>> >>>> >>>> On Thu, Oct 9, 2008 at 1:25 PM, Mike >>>> >>> Mangino >>> >> >>>> wrote: >>>>> >>>>> On Oct 9, 2008, at 4:04 PM, vincent chu wrote: >>>>> >>>>> Hi all -- >>>>>> >>>>>> I'm adding a facebook plugin to an existing website and would >>>>>> >>>>> like >>> >>>> to >>>>>> use data stored in existing models to display content on a >>>>>> >>>>> facebook >>> >>>> application. I would like the rest of the site to run normally >>>>>> (i.e., >>>>>> in NON-facebook mode), but I would like to define several views >>>>>> which >>>>>> the site would handle using facebooker / >>>>>> >>>>> facebooker_authentication. >>> >>>> >>>>>> Here's my conundrum (and apologies if this is a really simple >>>>>> question): how do I configure my site so that facebooker will only >>>>>> handle certain views? If I install facebooker, then my site is >>>>>> >>>>>> broken >>> >>>> because the installation make the site handle all views as >>>>>> >>>>> facebook >>> >>>> views. >>>>>> >>>>>> >>>>> What do you mean the site is broken? For non-facebook requests the >>>>> normal >>>>> process should be followed. If a request comes from Facebook, it >>>>> will try to >>>>> render the .fbml.erb template instead. >>>>> >>>>> Mike >>>>> >>>>> >>>>> Thanks, >>>>>> >>>>>> Vince >>>>>> >>>>>> -- >>>>>> Vincent Chu >>>>>> Department of Applied Physics >>>>>> Geballe Laboratory of Advanced Materials >>>>>> McCullough Bldg. 318 >>>>>> 476 Lomita Mall >>>>>> Stanford, CA, 94305 >>>>>> >>>>>> vchu AT post.harvard.edu >>>>>> vincentchu AT gmail.com >>>>>> >>>>>> http://www.stanford.edu/~vincentc(homepage, updated >>>>>> >>>>> sporadically) >>> >>>> >>>>>> Consider this: >>>>>> "The smallest positive integer not definable in under eleven >>>>>> >>>>> words." >>> >>>> _______________________________________________ >>>>>> Facebooker-talk mailing list >>>>>> Facebooker-talk at rubyforge.org >>>>>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>>>>> >>>>> >>>>> -- >>>>> Mike Mangino >>>>> http://www.elevatedrails.com >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Facebooker-talk mailing list >>>>> Facebooker-talk at rubyforge.org >>>>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>>>> >>>>> >>>> >>>> >>>> -- >>>> Vincent Chu >>>> Department of Applied Physics >>>> Geballe Laboratory of Advanced Materials >>>> McCullough Bldg. 318 >>>> 476 Lomita Mall >>>> Stanford, CA, 94305 >>>> >>>> >>>> vchu AT post.harvard.edu >>> >>>> vincentchu AT gmail.com >>>> >>>> http://www.stanford.edu/~vincentc (homepage, updated sporadically) >>>> >>>> Consider this: >>>> "The smallest positive integer not definable in under eleven >>>> >>> words." >>> >>> -- >>> Mike Mangino >>> http://www.elevatedrails.com >>> >>> >>> >>> _______________________________________________ >>> 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 >>> >>> >>> >> >> >> -- >> Vincent Chu >> Department of Applied Physics >> Geballe Laboratory of Advanced Materials >> McCullough Bldg. 318 >> 476 Lomita Mall >> Stanford, CA, 94305 >> >> vchu AT post.harvard.edu >> vincentchu AT gmail.com >> >> http://www.stanford.edu/~vincentc (homepage, updated sporadically) >> >> Consider this: >> "The smallest positive integer not definable in under eleven words." >> _______________________________________________ >> 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From vincentchu at gmail.com Sun Oct 12 23:58:35 2008 From: vincentchu at gmail.com (vincent chu) Date: Sun, 12 Oct 2008 20:58:35 -0700 Subject: [Facebooker-talk] Mixing Facebooker into an existing site In-Reply-To: References: <524931.49567.qm@web58704.mail.re1.yahoo.com> Message-ID: Hi David -- Thanks! This was exactly the answer I was looking for. Incidentally, one of my major concerns with using Facebooker is that I don't quite understand all of the changes that installing facebooker would make to my existing site -- e.g., I had no idea that facebooker would change ActionController::Base.asset_host. Looking through the source code, I found the exact line where this change is made, but I wouldn't have guessed it on my own. Is there any place in the documentation where these changes to existing behavior are noted? That would be really helpful. Cheers, Vince On Sun, Oct 12, 2008 at 5:41 PM, David Clements wrote: > The specific behavior mentioned happens because Facebooker requires the use > of the rails asset_host setting. > > I think the specific issue you are running into is that Facebooker assumes > that your callback_url will be set to mysite.com and not mysite.com/facebook > > I believe you can override this by setting your asset host and then > facebooker won't override it. > > We have this in our produciton.rb > ActionController::Base.asset_host = "http://assets%d.meetingwave.com" > > > I know it seems as though Facebooker is being invasive and changing lots of > behavoir but this is one of the more invasive things, I think everything > else works right out of the box. > > > > Dave > > > On Sun, Oct 12, 2008 at 4:57 PM, Joel Nylund wrote: >> >> There was a patch in feb (see the mail archives) from Shawn Van Ittersum >> submitted (but I dont think it ever got in cause of no test cases). >> >> It allowed you to put a prefix for facebook namespace (which can be a >> controller if you want) >> >> I have been using it in production since then to achieve the effect you >> are looking for. >> >> Not sure it will work on the current facebooker codebase, but it might be >> worth a try: >> >> When I use that patch I set: >> >> callback_url: mydomain.com >> and: >> ENV['FACEBOOKER_SANDBOX_NAMESPACE'] = '/face' >> >> which sets sends all facebook requests to my "face" controller. >> >> and in facebook I set my callback url to: >> mydomain.com/face/ >> >> the rest of my app works normally. >> >> Joel >> >> >> On Oct 12, 2008, at 4:41 PM, vincent chu wrote: >> >>> Hi -- >>> >>> Thanks for your help and sorry for being ambiguous. In greater detail: >>> >>> - I have a website, written in rails, that faces the outside world >>> (i.e., people go to "mysite.com" without being members of facebook, or >>> even interacting with facebook). This is already written and cannot >>> change very much. >>> >>> - I'm working on a facebook app which will use data from models in >>> "mysite.com"; I'd like to write a single controller that will handle >>> requests coming in from facebook (from profile tab views, and from >>> application canvas pages). I've set it up so that: >>> >>> callbackurl = mysite.com/facebook/ >>> canvas page = apps.facebook.com/mysiteapp/ >>> >>> - Ideally, I'd like the rest of my site to be ignorant of the >>> facebooker plugin and run as if it weren't there (like it does now); >>> I'd only want to facebooker plugin to do its magic only for those >>> views that have something to do with facebook. >>> >>> After I installed the facebooker plugin to my site, I found that >>> facebooker had altered the behavior of controllers/views that I didn't >>> want. For instance, I was using "bundle-fu" to bundle all of my >>> stylesheets/javascript together on normal site views. I now find that >>> my application outputs: >>> >>> >> href="http://mysite.com/facebookfoo//stylesheets/cache/bundle.css?1223842665" >>> ... >>> >>> instead of >>> >>> >> >>> like it did, before the facebooker plugin was installed. Seems like >>> facebooker has altered the environment of the rails app -- is there >>> anyway to turn this behavior off, except for controllers/views which >>> actually handle requests from facebook? >>> >>> Thanks for all of the help, >>> >>> Vince >>> >>> >>> >>> >>> >>> >>> >>> On Fri, Oct 10, 2008 at 8:54 AM, William Thomas >>> wrote: >>>> >>>> Agreed- not sure what is going on, here is my take >>>> >>>> IMO, you should keep your "normal views" (I think you mean the ones >>>> you're >>>> hosting and viewing from your domain) in .html.erb files , and >>>> the >>>> ones that facebook requests (hosted on your site but viewed from >>>> facebook) >>>> in .fbml.erb. >>>> >>>> If you have similarities you should break those out into something >>>> reusable >>>> like a partial, a helper, or a rails-cell >>>> >>>> --- On Thu, 10/9/08, Mike Mangino wrote: >>>> >>>> From: Mike Mangino >>>> Subject: Re: [Facebooker-talk] Mixing Facebooker into an existing site >>>> To: vchu at post.harvard.edu >>>> Cc: facebooker-talk at rubyforge.org >>>> Date: Thursday, October 9, 2008, 4:32 PM >>>> >>>> On Oct 9, 2008, at 4:44 PM, vincent chu wrote: >>>> >>>>> Mike -- >>>>> >>>>> I think I'm beginning to understand -- I have a view that gets called >>>>> when requests come in from facebook profile tabs; since fbml and html >>>>> are so similar, I had just modified my normal view to add in a few >>>>> facebook tags. However, the >>>> >>>> facebook profile tab is treated as a >>>>> >>>>> normal HTML view. When I installed facebooker, profile tab views are >>>>> now treated as facebook views, leading to the "breaking" of my >>>> >>>> app. >>>> >>>> I don't follow this. Is the view for profile tabs only called from >>>> Facebook, or from both Facebook and non-facebook? In either case, >>>> Facebook templates should be .fbml.erb templates. >>>> >>>> What do you mean by "treated as facebook views" ? >>>> >>>>> >>>>> >>>>> I'd really rather not treat the profile tab views as facebooker views >>>>> because the profile tab views are really only a slight modification of >>>>> an existing view -- is there any way to turn off the filtering for >>>>> this single view? >>>> >>>> Can you explain what you want to happen? What filtering are you >>>> talking about? >>>> >>>> Mike >>>> >>>>> >>>>> >>>>> Thanks, >>>>> >>>>> Vince >>>>> >>>>> >>>>> On Thu, Oct 9, 2008 at 1:25 PM, Mike >>>> >>>> Mangino >>>> >>>>> >>>>>> wrote: >>>>>> >>>>>> On Oct 9, 2008, at 4:04 PM, vincent chu wrote: >>>>>> >>>>>>> Hi all -- >>>>>>> >>>>>>> I'm adding a facebook plugin to an existing website and would >>>> >>>> like >>>>>>> >>>>>>> to >>>>>>> use data stored in existing models to display content on a >>>> >>>> facebook >>>>>>> >>>>>>> application. I would like the rest of the site to run normally >>>>>>> (i.e., >>>>>>> in NON-facebook mode), but I would like to define several views >>>>>>> which >>>>>>> the site would handle using facebooker / >>>> >>>> facebooker_authentication. >>>>>>> >>>>>>> Here's my conundrum (and apologies if this is a really simple >>>>>>> question): how do I configure my site so that facebooker will only >>>>>>> handle certain views? If I install facebooker, then my site is >>>>>>> >>>> broken >>>>>>> >>>>>>> because the installation make the site handle all views as >>>> >>>> facebook >>>>>>> >>>>>>> views. >>>>>>> >>>>>> >>>>>> What do you mean the site is broken? For non-facebook requests the >>>>>> normal >>>>>> process should be followed. If a request comes from Facebook, it >>>>>> will try to >>>>>> render the .fbml.erb template instead. >>>>>> >>>>>> Mike >>>>>> >>>>>> >>>>>>> Thanks, >>>>>>> >>>>>>> Vince >>>>>>> >>>>>>> -- >>>>>>> Vincent Chu >>>>>>> Department of Applied Physics >>>>>>> Geballe Laboratory of Advanced Materials >>>>>>> McCullough Bldg. 318 >>>>>>> 476 Lomita Mall >>>>>>> Stanford, CA, 94305 >>>>>>> >>>>>>> vchu AT post.harvard.edu >>>>>>> vincentchu AT gmail.com >>>>>>> >>>>>>> http://www.stanford.edu/~vincentc (homepage, updated >>>> >>>> sporadically) >>>>>>> >>>>>>> Consider this: >>>>>>> "The smallest positive integer not definable in under eleven >>>> >>>> words." >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Facebooker-talk mailing list >>>>>>> Facebooker-talk at rubyforge.org >>>>>>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>>>>> >>>>>> -- >>>>>> Mike Mangino >>>>>> http://www.elevatedrails.com >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Facebooker-talk mailing list >>>>>> Facebooker-talk at rubyforge.org >>>>>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Vincent Chu >>>>> Department of Applied Physics >>>>> Geballe Laboratory of Advanced Materials >>>>> McCullough Bldg. 318 >>>>> 476 Lomita Mall >>>>> Stanford, CA, 94305 >>>>> >>>>> >>>> vchu AT post.harvard.edu >>>>> >>>>> vincentchu AT gmail.com >>>>> >>>>> http://www.stanford.edu/~vincentc (homepage, updated sporadically) >>>>> >>>>> Consider this: >>>>> "The smallest positive integer not definable in under eleven >>>> >>>> words." >>>> >>>> -- >>>> Mike Mangino >>>> http://www.elevatedrails.com >>>> >>>> >>>> >>>> _______________________________________________ >>>> 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 >>>> >>>> >>> >>> >>> >>> -- >>> Vincent Chu >>> Department of Applied Physics >>> Geballe Laboratory of Advanced Materials >>> McCullough Bldg. 318 >>> 476 Lomita Mall >>> Stanford, CA, 94305 >>> >>> vchu AT post.harvard.edu >>> vincentchu AT gmail.com >>> >>> http://www.stanford.edu/~vincentc (homepage, updated sporadically) >>> >>> Consider this: >>> "The smallest positive integer not definable in under eleven words." >>> _______________________________________________ >>> 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 > > > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > > -- Vincent Chu Department of Applied Physics Geballe Laboratory of Advanced Materials McCullough Bldg. 318 476 Lomita Mall Stanford, CA, 94305 vchu AT post.harvard.edu vincentchu AT gmail.com http://www.stanford.edu/~vincentc (homepage, updated sporadically) Consider this: "The smallest positive integer not definable in under eleven words." From chrisnolan.ca+rubyforge at gmail.com Mon Oct 13 09:57:25 2008 From: chrisnolan.ca+rubyforge at gmail.com (Chris Nolan.ca) Date: Mon, 13 Oct 2008 09:57:25 -0400 Subject: [Facebooker-talk] Autocompleter Javascript? Message-ID: <4f6b19c0810130657x6ba717d8ha6af072571b9dd68@mail.gmail.com> Has anyone facebook-ized scriptaculous's autocompleter control yet? (http://demo.script.aculo.us/ajax/autocompleter_customized) fb:typeahead isn't working for me anymore (too many thousands of options), and I've had trouble in the past with http://wiki.developers.facebook.com/index.php/FBJS/Examples/Typeahead/AJAX I'd like to keep things simple and implement an auto_complete as I would otherwise (http://github.com/rails/auto_complete/) but didn't want to have to re-invent things by attemping to update the javascript if I don't have to. If not, what have others done? Thanks in advance, Chris Nolan.ca http://ChrisNolan.ca/ From mixonic at synitech.com Mon Oct 13 10:45:33 2008 From: mixonic at synitech.com (Matthew Beale) Date: Mon, 13 Oct 2008 10:45:33 -0400 Subject: [Facebooker-talk] Gem version, release plans Message-ID: <1223909133.8548.9.camel@localhost> Hi all, I've been building a site with facebooker that does a lot of pulling facebook data into our website, and only a little bit of traditional facebook app development. The library has been really great after gaining a good understanding of facebook's ill-documented authentication system. Now that I'm going to focus more on the in-facebook application I thought it would be a good time to upgrade my facebooker library. What's the best way to do this? The last gem release was 0.9.5, but it looks like the docs at facebooker.rubyforge.net are at 0.9.9 and the github master is at the same, though there isn't really any release. Is it maybe time to branch a 0.9.9 stable ala Rails? Is master considered stable enough for production? I'm just a little wary about pulling down master on braid, it'd be nice to tie to a release or a branch/tag. Thanks for the great work guys, I'll be sure to pass some code back as we expand our use of facebooker :-). Cheers, -- Matthew Beale :: 607 227 0871 Resume & Portfolio @ http://madhatted.com From digidigo at gmail.com Mon Oct 13 15:04:24 2008 From: digidigo at gmail.com (David Clements) Date: Mon, 13 Oct 2008 13:04:24 -0600 Subject: [Facebooker-talk] Mixing Facebooker into an existing site In-Reply-To: References: <524931.49567.qm@web58704.mail.re1.yahoo.com> Message-ID: I don't think we have anything like that. Most of us just read the code like you did. There are a couple of books out there right now which might give you a good sense on the scope of the plugin. http://www.pragprog.com/titles/mmfacer/developing-facebook-platform-applications-with-rails http://peepcode.com/products/rails-on-facebook Dave On Sun, Oct 12, 2008 at 9:58 PM, vincent chu wrote: > Hi David -- > > Thanks! This was exactly the answer I was looking for. Incidentally, > one of my major concerns with using Facebooker is that I don't quite > understand all of the changes that installing facebooker would make to > my existing site -- e.g., I had no idea that facebooker would change > ActionController::Base.asset_host. > > Looking through the source code, I found the exact line where this > change is made, but I wouldn't have guessed it on my own. Is there any > place in the documentation where these changes to existing behavior > are noted? That would be really helpful. > > Cheers, > > Vince > > On Sun, Oct 12, 2008 at 5:41 PM, David Clements > wrote: > > The specific behavior mentioned happens because Facebooker requires the > use > > of the rails asset_host setting. > > > > I think the specific issue you are running into is that Facebooker > assumes > > that your callback_url will be set to mysite.com and not > mysite.com/facebook > > > > I believe you can override this by setting your asset host and then > > facebooker won't override it. > > > > We have this in our produciton.rb > > ActionController::Base.asset_host = "http://assets%d.meetingwave.com" > > > > > > I know it seems as though Facebooker is being invasive and changing lots > of > > behavoir but this is one of the more invasive things, I think everything > > else works right out of the box. > > > > > > > > Dave > > > > > > On Sun, Oct 12, 2008 at 4:57 PM, Joel Nylund wrote: > >> > >> There was a patch in feb (see the mail archives) from Shawn Van Ittersum > >> submitted (but I dont think it ever got in cause of no test cases). > >> > >> It allowed you to put a prefix for facebook namespace (which can be a > >> controller if you want) > >> > >> I have been using it in production since then to achieve the effect you > >> are looking for. > >> > >> Not sure it will work on the current facebooker codebase, but it might > be > >> worth a try: > >> > >> When I use that patch I set: > >> > >> callback_url: mydomain.com > >> and: > >> ENV['FACEBOOKER_SANDBOX_NAMESPACE'] = '/face' > >> > >> which sets sends all facebook requests to my "face" controller. > >> > >> and in facebook I set my callback url to: > >> mydomain.com/face/ > >> > >> the rest of my app works normally. > >> > >> Joel > >> > >> > >> On Oct 12, 2008, at 4:41 PM, vincent chu wrote: > >> > >>> Hi -- > >>> > >>> Thanks for your help and sorry for being ambiguous. In greater detail: > >>> > >>> - I have a website, written in rails, that faces the outside world > >>> (i.e., people go to "mysite.com" without being members of facebook, or > >>> even interacting with facebook). This is already written and cannot > >>> change very much. > >>> > >>> - I'm working on a facebook app which will use data from models in > >>> "mysite.com"; I'd like to write a single controller that will handle > >>> requests coming in from facebook (from profile tab views, and from > >>> application canvas pages). I've set it up so that: > >>> > >>> callbackurl = mysite.com/facebook/ > >>> canvas page = apps.facebook.com/mysiteapp/ > >>> > >>> - Ideally, I'd like the rest of my site to be ignorant of the > >>> facebooker plugin and run as if it weren't there (like it does now); > >>> I'd only want to facebooker plugin to do its magic only for those > >>> views that have something to do with facebook. > >>> > >>> After I installed the facebooker plugin to my site, I found that > >>> facebooker had altered the behavior of controllers/views that I didn't > >>> want. For instance, I was using "bundle-fu" to bundle all of my > >>> stylesheets/javascript together on normal site views. I now find that > >>> my application outputs: > >>> > >>> >>> href=" > http://mysite.com/facebookfoo//stylesheets/cache/bundle.css?1223842665" > >>> ... > >>> > >>> instead of > >>> > >>> >>> > >>> like it did, before the facebooker plugin was installed. Seems like > >>> facebooker has altered the environment of the rails app -- is there > >>> anyway to turn this behavior off, except for controllers/views which > >>> actually handle requests from facebook? > >>> > >>> Thanks for all of the help, > >>> > >>> Vince > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> On Fri, Oct 10, 2008 at 8:54 AM, William Thomas > >>> wrote: > >>>> > >>>> Agreed- not sure what is going on, here is my take > >>>> > >>>> IMO, you should keep your "normal views" (I think you mean the ones > >>>> you're > >>>> hosting and viewing from your domain) in .html.erb files , and > >>>> the > >>>> ones that facebook requests (hosted on your site but viewed from > >>>> facebook) > >>>> in .fbml.erb. > >>>> > >>>> If you have similarities you should break those out into something > >>>> reusable > >>>> like a partial, a helper, or a rails-cell > >>>> > >>>> --- On Thu, 10/9/08, Mike Mangino wrote: > >>>> > >>>> From: Mike Mangino > >>>> Subject: Re: [Facebooker-talk] Mixing Facebooker into an existing site > >>>> To: vchu at post.harvard.edu > >>>> Cc: facebooker-talk at rubyforge.org > >>>> Date: Thursday, October 9, 2008, 4:32 PM > >>>> > >>>> On Oct 9, 2008, at 4:44 PM, vincent chu wrote: > >>>> > >>>>> Mike -- > >>>>> > >>>>> I think I'm beginning to understand -- I have a view that gets called > >>>>> when requests come in from facebook profile tabs; since fbml and html > >>>>> are so similar, I had just modified my normal view to add in a few > >>>>> facebook tags. However, the > >>>> > >>>> facebook profile tab is treated as a > >>>>> > >>>>> normal HTML view. When I installed facebooker, profile tab views are > >>>>> now treated as facebook views, leading to the "breaking" of my > >>>> > >>>> app. > >>>> > >>>> I don't follow this. Is the view for profile tabs only called from > >>>> Facebook, or from both Facebook and non-facebook? In either case, > >>>> Facebook templates should be .fbml.erb templates. > >>>> > >>>> What do you mean by "treated as facebook views" ? > >>>> > >>>>> > >>>>> > >>>>> I'd really rather not treat the profile tab views as facebooker views > >>>>> because the profile tab views are really only a slight modification > of > >>>>> an existing view -- is there any way to turn off the filtering for > >>>>> this single view? > >>>> > >>>> Can you explain what you want to happen? What filtering are you > >>>> talking about? > >>>> > >>>> Mike > >>>> > >>>>> > >>>>> > >>>>> Thanks, > >>>>> > >>>>> Vince > >>>>> > >>>>> > >>>>> On Thu, Oct 9, 2008 at 1:25 PM, Mike > >>>> > >>>> Mangino > >>>> >>>>>> > >>>>>> wrote: > >>>>>> > >>>>>> On Oct 9, 2008, at 4:04 PM, vincent chu wrote: > >>>>>> > >>>>>>> Hi all -- > >>>>>>> > >>>>>>> I'm adding a facebook plugin to an existing website and would > >>>> > >>>> like > >>>>>>> > >>>>>>> to > >>>>>>> use data stored in existing models to display content on a > >>>> > >>>> facebook > >>>>>>> > >>>>>>> application. I would like the rest of the site to run normally > >>>>>>> (i.e., > >>>>>>> in NON-facebook mode), but I would like to define several views > >>>>>>> which > >>>>>>> the site would handle using facebooker / > >>>> > >>>> facebooker_authentication. > >>>>>>> > >>>>>>> Here's my conundrum (and apologies if this is a really simple > >>>>>>> question): how do I configure my site so that facebooker will only > >>>>>>> handle certain views? If I install facebooker, then my site is > >>>>>>> > >>>> broken > >>>>>>> > >>>>>>> because the installation make the site handle all views as > >>>> > >>>> facebook > >>>>>>> > >>>>>>> views. > >>>>>>> > >>>>>> > >>>>>> What do you mean the site is broken? For non-facebook requests the > >>>>>> normal > >>>>>> process should be followed. If a request comes from Facebook, it > >>>>>> will try to > >>>>>> render the .fbml.erb template instead. > >>>>>> > >>>>>> Mike > >>>>>> > >>>>>> > >>>>>>> Thanks, > >>>>>>> > >>>>>>> Vince > >>>>>>> > >>>>>>> -- > >>>>>>> Vincent Chu > >>>>>>> Department of Applied Physics > >>>>>>> Geballe Laboratory of Advanced Materials > >>>>>>> McCullough Bldg. 318 > >>>>>>> 476 Lomita Mall > >>>>>>> Stanford, CA, 94305 > >>>>>>> > >>>>>>> vchu AT post.harvard.edu > >>>>>>> vincentchu AT gmail.com > >>>>>>> > >>>>>>> http://www.stanford.edu/~vincentc(homepage, updated > >>>> > >>>> sporadically) > >>>>>>> > >>>>>>> Consider this: > >>>>>>> "The smallest positive integer not definable in under eleven > >>>> > >>>> words." > >>>>>>> > >>>>>>> _______________________________________________ > >>>>>>> Facebooker-talk mailing list > >>>>>>> Facebooker-talk at rubyforge.org > >>>>>>> http://rubyforge.org/mailman/listinfo/facebooker-talk > >>>>>> > >>>>>> -- > >>>>>> Mike Mangino > >>>>>> http://www.elevatedrails.com > >>>>>> > >>>>>> > >>>>>> > >>>>>> _______________________________________________ > >>>>>> Facebooker-talk mailing list > >>>>>> Facebooker-talk at rubyforge.org > >>>>>> http://rubyforge.org/mailman/listinfo/facebooker-talk > >>>>>> > >>>>> > >>>>> > >>>>> > >>>>> -- > >>>>> Vincent Chu > >>>>> Department of Applied Physics > >>>>> Geballe Laboratory of Advanced Materials > >>>>> McCullough Bldg. 318 > >>>>> 476 Lomita Mall > >>>>> Stanford, CA, 94305 > >>>>> > >>>>> > >>>> vchu AT post.harvard.edu > >>>>> > >>>>> vincentchu AT gmail.com > >>>>> > >>>>> http://www.stanford.edu/~vincentc(homepage, updated sporadically) > >>>>> > >>>>> Consider this: > >>>>> "The smallest positive integer not definable in under eleven > >>>> > >>>> words." > >>>> > >>>> -- > >>>> Mike Mangino > >>>> http://www.elevatedrails.com > >>>> > >>>> > >>>> > >>>> _______________________________________________ > >>>> 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 > >>>> > >>>> > >>> > >>> > >>> > >>> -- > >>> Vincent Chu > >>> Department of Applied Physics > >>> Geballe Laboratory of Advanced Materials > >>> McCullough Bldg. 318 > >>> 476 Lomita Mall > >>> Stanford, CA, 94305 > >>> > >>> vchu AT post.harvard.edu > >>> vincentchu AT gmail.com > >>> > >>> http://www.stanford.edu/~vincentc(homepage, updated sporadically) > >>> > >>> Consider this: > >>> "The smallest positive integer not definable in under eleven words." > >>> _______________________________________________ > >>> 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 > > > > > > _______________________________________________ > > Facebooker-talk mailing list > > Facebooker-talk at rubyforge.org > > http://rubyforge.org/mailman/listinfo/facebooker-talk > > > > > > > > -- > Vincent Chu > Department of Applied Physics > Geballe Laboratory of Advanced Materials > McCullough Bldg. 318 > 476 Lomita Mall > Stanford, CA, 94305 > > vchu AT post.harvard.edu > vincentchu AT gmail.com > > http://www.stanford.edu/~vincentc (homepage, updated sporadically) > > Consider this: > "The smallest positive integer not definable in under eleven words." > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mmangino at elevatedrails.com Mon Oct 13 15:39:49 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Mon, 13 Oct 2008 15:39:49 -0400 Subject: [Facebooker-talk] Mixing Facebooker into an existing site In-Reply-To: References: <524931.49567.qm@web58704.mail.re1.yahoo.com> Message-ID: I agree that we need much better documentation than we currently have. I would love to have some help with that. If anyone is interested, let me know. I will help as much as possible. Mike On Oct 13, 2008, at 3:04 PM, David Clements wrote: > I don't think we have anything like that. Most of us just read the > code like you did. > > There are a couple of books out there right now which might give you > a good sense on the scope of the plugin. > > http://www.pragprog.com/titles/mmfacer/developing-facebook-platform-applications-with-rails > > http://peepcode.com/products/rails-on-facebook > > > Dave > > > On Sun, Oct 12, 2008 at 9:58 PM, vincent chu > wrote: > Hi David -- > > Thanks! This was exactly the answer I was looking for. Incidentally, > one of my major concerns with using Facebooker is that I don't quite > understand all of the changes that installing facebooker would make to > my existing site -- e.g., I had no idea that facebooker would change > ActionController::Base.asset_host. > > Looking through the source code, I found the exact line where this > change is made, but I wouldn't have guessed it on my own. Is there any > place in the documentation where these changes to existing behavior > are noted? That would be really helpful. > > Cheers, > > Vince > > On Sun, Oct 12, 2008 at 5:41 PM, David Clements > wrote: > > The specific behavior mentioned happens because Facebooker > requires the use > > of the rails asset_host setting. > > > > I think the specific issue you are running into is that Facebooker > assumes > > that your callback_url will be set to mysite.com and not > mysite.com/facebook > > > > I believe you can override this by setting your asset host and then > > facebooker won't override it. > > > > We have this in our produciton.rb > > ActionController::Base.asset_host = "http://assets > %d.meetingwave.com" > > > > > > I know it seems as though Facebooker is being invasive and > changing lots of > > behavoir but this is one of the more invasive things, I think > everything > > else works right out of the box. > > > > > > > > Dave > > > > > > On Sun, Oct 12, 2008 at 4:57 PM, Joel Nylund > wrote: > >> > >> There was a patch in feb (see the mail archives) from Shawn Van > Ittersum > >> submitted (but I dont think it ever got in cause of no test cases). > >> > >> It allowed you to put a prefix for facebook namespace (which can > be a > >> controller if you want) > >> > >> I have been using it in production since then to achieve the > effect you > >> are looking for. > >> > >> Not sure it will work on the current facebooker codebase, but it > might be > >> worth a try: > >> > >> When I use that patch I set: > >> > >> callback_url: mydomain.com > >> and: > >> ENV['FACEBOOKER_SANDBOX_NAMESPACE'] = '/face' > >> > >> which sets sends all facebook requests to my "face" controller. > >> > >> and in facebook I set my callback url to: > >> mydomain.com/face/ > >> > >> the rest of my app works normally. > >> > >> Joel > >> > >> > >> On Oct 12, 2008, at 4:41 PM, vincent chu wrote: > >> > >>> Hi -- > >>> > >>> Thanks for your help and sorry for being ambiguous. In greater > detail: > >>> > >>> - I have a website, written in rails, that faces the outside world > >>> (i.e., people go to "mysite.com" without being members of > facebook, or > >>> even interacting with facebook). This is already written and > cannot > >>> change very much. > >>> > >>> - I'm working on a facebook app which will use data from models in > >>> "mysite.com"; I'd like to write a single controller that will > handle > >>> requests coming in from facebook (from profile tab views, and from > >>> application canvas pages). I've set it up so that: > >>> > >>> callbackurl = mysite.com/facebook/ > >>> canvas page = apps.facebook.com/mysiteapp/ > >>> > >>> - Ideally, I'd like the rest of my site to be ignorant of the > >>> facebooker plugin and run as if it weren't there (like it does > now); > >>> I'd only want to facebooker plugin to do its magic only for those > >>> views that have something to do with facebook. > >>> > >>> After I installed the facebooker plugin to my site, I found that > >>> facebooker had altered the behavior of controllers/views that I > didn't > >>> want. For instance, I was using "bundle-fu" to bundle all of my > >>> stylesheets/javascript together on normal site views. I now find > that > >>> my application outputs: > >>> > >>> >>> href="http://mysite.com/facebookfoo//stylesheets/cache/bundle.css?1223842665 > " > >>> ... > >>> > >>> instead of > >>> > >>> >>> > >>> like it did, before the facebooker plugin was installed. Seems > like > >>> facebooker has altered the environment of the rails app -- is > there > >>> anyway to turn this behavior off, except for controllers/views > which > >>> actually handle requests from facebook? > >>> > >>> Thanks for all of the help, > >>> > >>> Vince > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> On Fri, Oct 10, 2008 at 8:54 AM, William Thomas > > >>> wrote: > >>>> > >>>> Agreed- not sure what is going on, here is my take > >>>> > >>>> IMO, you should keep your "normal views" (I think you mean the > ones > >>>> you're > >>>> hosting and viewing from your domain) in .html.erb > files , and > >>>> the > >>>> ones that facebook requests (hosted on your site but viewed from > >>>> facebook) > >>>> in .fbml.erb. > >>>> > >>>> If you have similarities you should break those out into > something > >>>> reusable > >>>> like a partial, a helper, or a rails-cell > >>>> > >>>> --- On Thu, 10/9/08, Mike Mangino > wrote: > >>>> > >>>> From: Mike Mangino > >>>> Subject: Re: [Facebooker-talk] Mixing Facebooker into an > existing site > >>>> To: vchu at post.harvard.edu > >>>> Cc: facebooker-talk at rubyforge.org > >>>> Date: Thursday, October 9, 2008, 4:32 PM > >>>> > >>>> On Oct 9, 2008, at 4:44 PM, vincent chu wrote: > >>>> > >>>>> Mike -- > >>>>> > >>>>> I think I'm beginning to understand -- I have a view that gets > called > >>>>> when requests come in from facebook profile tabs; since fbml > and html > >>>>> are so similar, I had just modified my normal view to add in a > few > >>>>> facebook tags. However, the > >>>> > >>>> facebook profile tab is treated as a > >>>>> > >>>>> normal HTML view. When I installed facebooker, profile tab > views are > >>>>> now treated as facebook views, leading to the "breaking" of my > >>>> > >>>> app. > >>>> > >>>> I don't follow this. Is the view for profile tabs only called > from > >>>> Facebook, or from both Facebook and non-facebook? In either case, > >>>> Facebook templates should be .fbml.erb templates. > >>>> > >>>> What do you mean by "treated as facebook views" ? > >>>> > >>>>> > >>>>> > >>>>> I'd really rather not treat the profile tab views as > facebooker views > >>>>> because the profile tab views are really only a slight > modification of > >>>>> an existing view -- is there any way to turn off the filtering > for > >>>>> this single view? > >>>> > >>>> Can you explain what you want to happen? What filtering are you > >>>> talking about? > >>>> > >>>> Mike > >>>> > >>>>> > >>>>> > >>>>> Thanks, > >>>>> > >>>>> Vince > >>>>> > >>>>> > >>>>> On Thu, Oct 9, 2008 at 1:25 PM, Mike > >>>> > >>>> Mangino > >>>> >>>>>> > >>>>>> wrote: > >>>>>> > >>>>>> On Oct 9, 2008, at 4:04 PM, vincent chu wrote: > >>>>>> > >>>>>>> Hi all -- > >>>>>>> > >>>>>>> I'm adding a facebook plugin to an existing website and would > >>>> > >>>> like > >>>>>>> > >>>>>>> to > >>>>>>> use data stored in existing models to display content on a > >>>> > >>>> facebook > >>>>>>> > >>>>>>> application. I would like the rest of the site to run normally > >>>>>>> (i.e., > >>>>>>> in NON-facebook mode), but I would like to define several > views > >>>>>>> which > >>>>>>> the site would handle using facebooker / > >>>> > >>>> facebooker_authentication. > >>>>>>> > >>>>>>> Here's my conundrum (and apologies if this is a really simple > >>>>>>> question): how do I configure my site so that facebooker > will only > >>>>>>> handle certain views? If I install facebooker, then my site > is > >>>>>>> > >>>> broken > >>>>>>> > >>>>>>> because the installation make the site handle all views as > >>>> > >>>> facebook > >>>>>>> > >>>>>>> views. > >>>>>>> > >>>>>> > >>>>>> What do you mean the site is broken? For non-facebook > requests the > >>>>>> normal > >>>>>> process should be followed. If a request comes from Facebook, > it > >>>>>> will try to > >>>>>> render the .fbml.erb template instead. > >>>>>> > >>>>>> Mike > >>>>>> > >>>>>> > >>>>>>> Thanks, > >>>>>>> > >>>>>>> Vince > >>>>>>> > >>>>>>> -- > >>>>>>> Vincent Chu > >>>>>>> Department of Applied Physics > >>>>>>> Geballe Laboratory of Advanced Materials > >>>>>>> McCullough Bldg. 318 > >>>>>>> 476 Lomita Mall > >>>>>>> Stanford, CA, 94305 > >>>>>>> > >>>>>>> vchu AT post.harvard.edu > >>>>>>> vincentchu AT gmail.com > >>>>>>> > >>>>>>> http://www.stanford.edu/~vincentc (homepage, updated > >>>> > >>>> sporadically) > >>>>>>> > >>>>>>> Consider this: > >>>>>>> "The smallest positive integer not definable in under eleven > >>>> > >>>> words." > >>>>>>> > >>>>>>> _______________________________________________ > >>>>>>> Facebooker-talk mailing list > >>>>>>> Facebooker-talk at rubyforge.org > >>>>>>> http://rubyforge.org/mailman/listinfo/facebooker-talk > >>>>>> > >>>>>> -- > >>>>>> Mike Mangino > >>>>>> http://www.elevatedrails.com > >>>>>> > >>>>>> > >>>>>> > >>>>>> _______________________________________________ > >>>>>> Facebooker-talk mailing list > >>>>>> Facebooker-talk at rubyforge.org > >>>>>> http://rubyforge.org/mailman/listinfo/facebooker-talk > >>>>>> > >>>>> > >>>>> > >>>>> > >>>>> -- > >>>>> Vincent Chu > >>>>> Department of Applied Physics > >>>>> Geballe Laboratory of Advanced Materials > >>>>> McCullough Bldg. 318 > >>>>> 476 Lomita Mall > >>>>> Stanford, CA, 94305 > >>>>> > >>>>> > >>>> vchu AT post.harvard.edu > >>>>> > >>>>> vincentchu AT gmail.com > >>>>> > >>>>> http://www.stanford.edu/~vincentc (homepage, updated > sporadically) > >>>>> > >>>>> Consider this: > >>>>> "The smallest positive integer not definable in under eleven > >>>> > >>>> words." > >>>> > >>>> -- > >>>> Mike Mangino > >>>> http://www.elevatedrails.com > >>>> > >>>> > >>>> > >>>> _______________________________________________ > >>>> 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 > >>>> > >>>> > >>> > >>> > >>> > >>> -- > >>> Vincent Chu > >>> Department of Applied Physics > >>> Geballe Laboratory of Advanced Materials > >>> McCullough Bldg. 318 > >>> 476 Lomita Mall > >>> Stanford, CA, 94305 > >>> > >>> vchu AT post.harvard.edu > >>> vincentchu AT gmail.com > >>> > >>> http://www.stanford.edu/~vincentc (homepage, updated sporadically) > >>> > >>> Consider this: > >>> "The smallest positive integer not definable in under eleven > words." > >>> _______________________________________________ > >>> 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 > > > > > > _______________________________________________ > > Facebooker-talk mailing list > > Facebooker-talk at rubyforge.org > > http://rubyforge.org/mailman/listinfo/facebooker-talk > > > > > > > > -- > Vincent Chu > Department of Applied Physics > Geballe Laboratory of Advanced Materials > McCullough Bldg. 318 > 476 Lomita Mall > Stanford, CA, 94305 > > vchu AT post.harvard.edu > vincentchu AT gmail.com > > http://www.stanford.edu/~vincentc (homepage, updated sporadically) > > Consider this: > "The smallest positive integer not definable in under eleven words." > > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk -- Mike Mangino http://www.elevatedrails.com From schroeder.ken at gmail.com Tue Oct 14 00:56:05 2008 From: schroeder.ken at gmail.com (Ken Schroeder) Date: Tue, 14 Oct 2008 00:56:05 -0400 Subject: [Facebooker-talk] Facebook AJAX Requests Message-ID: Got two issues trying to get AJAX requests to work here still. I'm able to get Mock Ajax or form_remote_tag to work mostly how I want with the exception of I'm getting a filter chain halt because of before_filter ensure_application_is_installed_by_facebook_user in applicaiton.rb. How are people working around that? Also I'm still having trouble getting remote_form_for to work same as form_remote_tag with similar syntaxa? <% remote_form_for participants.profiles.first, :url=>profiles_url(:canvas=>false) do |f| %> Any ideas appreciated thanks --ken -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephane.akkaoui at imeuble.info Tue Oct 14 04:35:40 2008 From: stephane.akkaoui at imeuble.info (=?ISO-8859-1?Q?St=E9phane_Akkaoui?=) Date: Tue, 14 Oct 2008 10:35:40 +0200 Subject: [Facebooker-talk] Contributing Message-ID: <57E749C3-1D42-4E33-8D00-1AC56739D06E@imeuble.info> Hi, While working with the facebooker plugin, I have added features and improve some points. I would be glad to share my work with everybody. What are the rules for contributing to Facebooker ? After reading past mails about contributing, I have forked the master branch to start working. As I'm not familiar with github, I don't know if you are aware of forks or if I have to put here the changes I've made. What is the validation process to merge my branch into master ? For now, on this forked branch, I have just fixed session retriving bug and I'm working on Pages (missing API methods, better object oriented implementation...). It's only suggestions, so I'm ready to discuss in case of disagree. -- St?phane Akkaoui http://www.sociabliz.com [fr] http://imeubl.info [fr] From mmangino at elevatedrails.com Tue Oct 14 08:23:05 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Tue, 14 Oct 2008 08:23:05 -0400 Subject: [Facebooker-talk] Contributing In-Reply-To: <57E749C3-1D42-4E33-8D00-1AC56739D06E@imeuble.info> References: <57E749C3-1D42-4E33-8D00-1AC56739D06E@imeuble.info> Message-ID: <6F5C8307-B2A1-4DD3-A05B-FB1424D24411@elevatedrails.com> On Oct 14, 2008, at 4:35 AM, St?phane Akkaoui wrote: > Hi, > > While working with the facebooker plugin, I have added features and > improve some points. I would be glad to share my work with everybody. > > What are the rules for contributing to Facebooker ? Just write some good code. That's all we ask :) > > > After reading past mails about contributing, I have forked the > master branch to start working. As I'm not familiar with github, I > don't know if you are aware of forks or if I have to put here the > changes I've made. What is the validation process to merge my branch > into master ? > Just let me know which commits are ready. I can pull in your commits one at a time or I can merge it all at once. I normally prefer to pull in just a commit or two at once. It makes it easier for me to understand what is going on. > For now, on this forked branch, I have just fixed session retriving > bug and I'm working on Pages (missing API methods, better object > oriented implementation...). That's great. I'll take a look at your branch this week. Mike > > > It's only suggestions, so I'm ready to discuss in case of disagree. > > -- > St?phane Akkaoui > http://www.sociabliz.com [fr] > http://imeubl.info [fr] > _______________________________________________ > 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 Tue Oct 14 08:24:46 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Tue, 14 Oct 2008 08:24:46 -0400 Subject: [Facebooker-talk] Facebook AJAX Requests In-Reply-To: References: Message-ID: On Oct 14, 2008, at 12:56 AM, Ken Schroeder wrote: > Got two issues trying to get AJAX requests to work here still. I'm > able to get Mock Ajax or form_remote_tag to work mostly how I want > with the exception of I'm getting a filter chain halt because of > before_filter ensure_application_is_installed_by_facebook_user in > applicaiton.rb. How are people working around that? Also I'm still > having trouble getting remote_form_for to work same as > form_remote_tag with similar syntaxa? <% remote_form_for > participants.profiles.first, :url=>profiles_url(:canvas=>false) do | > f| %> Don't you get a valid param list on your ajax requests? I know I used to. I've had some problems with remote_form_for due to a Facebook bug. They kill some of the [ and ] in the params. I opened a bug, but I don't think they have fixed it. Is this the problem you are seeing as well? Mike > > > Any ideas appreciated thanks --ken > > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk -- Mike Mangino http://www.elevatedrails.com From schroeder.ken at gmail.com Tue Oct 14 12:11:07 2008 From: schroeder.ken at gmail.com (Ken Schroeder) Date: Tue, 14 Oct 2008 12:11:07 -0400 Subject: [Facebooker-talk] Facebook AJAX Requests In-Reply-To: References: Message-ID: The parameters being submitted appear valid, when I use form_remote_tag the request is submitted properly as far as I can tell. One thing I have found is if I remove the | f | from my <% remote_form_for do | f | %> it submits a ajax request. Including | f | in either remote_form_for or form_remote_tag causes a standard page submit non ajax. Additionally if I dont' have | f | and try to use text_field_tag like such: <% text_field_tag "profiles[first_name]" %> instead of just <% text_field_tag :first_name %> this also causes the request to be submitted as a non-ajax request. I am currently having some issues with the Javascript after the submit but I'm sure it's me I haven't gotten to look into that problem too much yet. The remote_form_for syntax does a standard page submit. On Tue, Oct 14, 2008 at 8:24 AM, Mike Mangino wrote: > > On Oct 14, 2008, at 12:56 AM, Ken Schroeder wrote: > > Got two issues trying to get AJAX requests to work here still. I'm able >> to get Mock Ajax or form_remote_tag to work mostly how I want with the >> exception of I'm getting a filter chain halt because of before_filter >> ensure_application_is_installed_by_facebook_user in applicaiton.rb. How >> are people working around that? Also I'm still having trouble getting >> remote_form_for to work same as form_remote_tag with similar syntaxa? <% >> remote_form_for participants.profiles.first, >> :url=>profiles_url(:canvas=>false) do |f| %> >> > > Don't you get a valid param list on your ajax requests? I know I used to. > > I've had some problems with remote_form_for due to a Facebook bug. They > kill some of the [ and ] in the params. I opened a bug, but I don't think > they have fixed it. > > Is this the problem you are seeing as well? > > Mike > > > >> >> Any ideas appreciated thanks --ken >> >> _______________________________________________ >> 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: From michael at bodaro.com Wed Oct 15 05:39:26 2008 From: michael at bodaro.com (Mike Papper) Date: Wed, 15 Oct 2008 02:39:26 -0700 Subject: [Facebooker-talk] FB Notify URLs and ensure_authenticated_to_facebook Message-ID: <69BDD071-1FF6-4725-894A-B617898ADEAD@bodaro.com> Hi, I am having a problem with verifying the facebook request when it comes from the FB server after the user removes the application... Consider 3 functions for ensure_* 1) Verify a request really comes from FB server 2) Verify that the user passed to me is who they say they are (really logged into FB) - not necc. have added my app 3) Tell me if the user has the application installed (or not). I assumed that ensure_authenticated_to_facebook is to do #1 and #2 above. But the code shows that if there is no current session, the request MUST be for the canvas page otherwise we get a redirect to "add this application" dialog. What I see in the log is this: ----------- Processing FbController#removed (for IP>IP>IP>IP at 2008-10-15 02:14:21) [POST] Session ID: 04a1dde838ab7995b6c183d24a482dc7 Parameters: {"fb_sig_time"=>"1224062193.5147", "fb_sig"=>"3c8fa09dc068fb76191fe1c39dcb3957", "fb_sig_in_new_facebook"=>"1", "fb_sig_locale"=>"en_US", "action"=>"removed", "controller"=>"fb", "fb_sig_added"=>"0", "fb_sig_api_key"=>"2401897b464320e9142685f65bd57bb0", "fb_sig_user"=>"1558955543", "fb_sig_uninstall"=>"1"} Redirected to http://www.facebook.com/login.php? api_key=XXXXXX4320e9142685f65bd57bb0&v=1.0 Filter chain halted as [#] rendered_or_redirected. Completed in 0.00036 (2763 reqs/sec) | DB: 0.00000 (0%) | 302 Found [http:///fb/removed] ---------------- Note: no fb_sig_session parameter Note: Is fb_sig_user My action method is never called - a problem! My problem is that if I dont call ensure_auth... I cannot make sure the request came from anybody on the Internet. If I call it, my action method never gets called. Related Question: -------------------------- What is the difference between a user granting "access" for my app and "adding" my app? Similar Issue Too: ----------------------- When I get a callback for the "authorized" post-url reuqest from FB (whichis sent to /fb/post-authorize (NOT a FB page request like apps.facebook.com/my_app...) I get this error: Facebooker::Session::IncorrectSignature Presumably the current session SIG doesnt match this one since the request is different...any ideas here? Mike From lee at crossbonesystems.com Wed Oct 15 13:25:23 2008 From: lee at crossbonesystems.com (Lee Mallabone) Date: Wed, 15 Oct 2008 18:25:23 +0100 Subject: [Facebooker-talk] registering feed template bundles Message-ID: Hi all, I'm curious, how do people currently manage "registering" template bundles for their app's feed stories? I'm not talking about the specific method calls, but how do you determine *when* to register a template? Right now I have a call to the relevant register_action() method of my publisher objects in my controller. It gets called just before I call deliver_action(), but this is far from ideal as it slows down the request processing. My current thinking is that I should perhaps write a facebooker-specific rake task to register all the feed templates in a rails app. The tricky part is how to manage different versions of templates being registered in development and production. Anyone have any thoughts on this, or willing to share their current approach? Thanks, Lee. -- Lee Mallabone Director, Crossbone Systems Ltd http://www.crossbonesystems.com http://www.fonicmonkey.net http://CambridgeWebHeads.ning.com From digidigo at gmail.com Wed Oct 15 13:31:13 2008 From: digidigo at gmail.com (David Clements) Date: Wed, 15 Oct 2008 11:31:13 -0600 Subject: [Facebooker-talk] registering feed template bundles In-Reply-To: References: Message-ID: When I am about to publish an action I check to see if the template is registered. If it is not then I register it before publishing. Then I push to production and test all the publishing, which registers the templates. Dave On Wed, Oct 15, 2008 at 11:25 AM, Lee Mallabone wrote: > Hi all, > > I'm curious, how do people currently manage "registering" template > bundles for their app's feed stories? I'm not talking about the > specific method calls, but how do you determine *when* to register a > template? > > Right now I have a call to the relevant register_action() method of my > publisher objects in my controller. It gets called just before I call > deliver_action(), but this is far from ideal as it slows down the > request processing. > > My current thinking is that I should perhaps write a > facebooker-specific rake task to register all the feed templates in a > rails app. The tricky part is how to manage different versions of > templates being registered in development and production. > > Anyone have any thoughts on this, or willing to share their current > approach? > > Thanks, > Lee. > > > -- > Lee Mallabone > Director, Crossbone Systems Ltd > > http://www.crossbonesystems.com > http://www.fonicmonkey.net > http://CambridgeWebHeads.ning.com > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephane.akkaoui at imeuble.info Wed Oct 15 13:34:41 2008 From: stephane.akkaoui at imeuble.info (=?ISO-8859-1?Q?St=E9phane_Akkaoui?=) Date: Wed, 15 Oct 2008 19:34:41 +0200 Subject: [Facebooker-talk] registering feed template bundles In-Reply-To: References: Message-ID: Hi, Facebooker provide a generator for publishers. $ script/generate publisher app on my observer, I have something like : class MessageObserver < ActiveRecord::Observer observe Message def after_save(message) AppPublisher.register_new_message_feeds unless Facebooker ::Rails ::Publisher::FacebookTemplate.find_by_template_name("new_message_feeds") AppPublisher.deliver_new_message_feed(message) end end and in my publisher : class AppPublisher < Facebooker::Rails::Publisher def new_message_feed_item_template one_line_story_template(_('one_line_story_template_new_message')) short_story_template(_('short_story_template_new_message_title'), _('short_story_template_new_message_body')) full_story_template(_('full_story_template_new_message_title'), _('full_story_template_new_message_body')) end def new_message_feed_item(message) user = Facebooker::User.new(message.user.uid) send_as :user_action from(user) target_ids(user.some_friends) data({ :data1 => "value1", :data2 => "value2", }) end end HTH, -- St?phane Akkaoui Le 15 oct. 08 ? 19:25, Lee Mallabone a ?crit : > Hi all, > > I'm curious, how do people currently manage "registering" template > bundles for their app's feed stories? I'm not talking about the > specific method calls, but how do you determine *when* to register a > template? > > Right now I have a call to the relevant register_action() method of my > publisher objects in my controller. It gets called just before I call > deliver_action(), but this is far from ideal as it slows down the > request processing. > > My current thinking is that I should perhaps write a > facebooker-specific rake task to register all the feed templates in a > rails app. The tricky part is how to manage different versions of > templates being registered in development and production. > > Anyone have any thoughts on this, or willing to share their current > approach? > > Thanks, > Lee. > > > -- > Lee Mallabone > Director, Crossbone Systems Ltd > > http://www.crossbonesystems.com > http://www.fonicmonkey.net > http://CambridgeWebHeads.ning.com > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk From mmangino at elevatedrails.com Wed Oct 15 13:45:20 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Wed, 15 Oct 2008 13:45:20 -0400 Subject: [Facebooker-talk] registering feed template bundles In-Reply-To: References: Message-ID: On Oct 15, 2008, at 1:25 PM, Lee Mallabone wrote: > Hi all, > > I'm curious, how do people currently manage "registering" template > bundles for their app's feed stories? I'm not talking about the > specific method calls, but how do you determine *when* to register a > template? > > Right now I have a call to the relevant register_action() method of my > publisher objects in my controller. It gets called just before I call > deliver_action(), but this is far from ideal as it slows down the > request processing. > > My current thinking is that I should perhaps write a > facebooker-specific rake task to register all the feed templates in a > rails app. The tricky part is how to manage different versions of > templates being registered in development and production. We use a cap task that registers on each deploy. It registers all of the templates and then unregisters any old ones. Victor Costan has been working on support for auto-registering new templates on first use. Hopefully that will be available by the end of the week. Mike > > > Anyone have any thoughts on this, or willing to share their current > approach? > > Thanks, > Lee. > > > -- > Lee Mallabone > Director, Crossbone Systems Ltd > > http://www.crossbonesystems.com > http://www.fonicmonkey.net > http://CambridgeWebHeads.ning.com > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk -- Mike Mangino http://www.elevatedrails.com From ambivalence at gmail.com Wed Oct 15 17:44:15 2008 From: ambivalence at gmail.com (Yu-Shan Fung) Date: Wed, 15 Oct 2008 14:44:15 -0700 Subject: [Facebooker-talk] REXML vs libxml Message-ID: <5a002f4a0810151444n47c8ce6dvf910e6d9de53be70@mail.gmail.com> Hi all, I've been looking at the performance of my fb app and one glaring issue seems to be with the parsing speed of rexml in processing the results. Has anyone looked into porting the facebooker parser from rexml to libxml? If not, any reason I shouldn't try? Thanks! Yu-Shan. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mmangino at elevatedrails.com Wed Oct 15 18:27:19 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Wed, 15 Oct 2008 18:27:19 -0400 Subject: [Facebooker-talk] REXML vs libxml In-Reply-To: <5a002f4a0810151444n47c8ce6dvf910e6d9de53be70@mail.gmail.com> References: <5a002f4a0810151444n47c8ce6dvf910e6d9de53be70@mail.gmail.com> Message-ID: On Oct 15, 2008, at 5:44 PM, Yu-Shan Fung wrote: > Hi all, > > I've been looking at the performance of my fb app and one glaring > issue seems to be with the parsing speed of rexml in processing the > results. Has anyone looked into porting the facebooker parser from > rexml to libxml? If not, any reason I shouldn't try? Have you actually benchmarked this? If you have, and it is truly an issue and you can make it transparent, go for it. I would be shocked if this is a bottleneck for the typical web application. Mike > > > Thanks! > Yu-Shan. > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk -- Mike Mangino http://www.elevatedrails.com From ambivalence at gmail.com Wed Oct 15 19:16:56 2008 From: ambivalence at gmail.com (Yu-Shan Fung) Date: Wed, 15 Oct 2008 16:16:56 -0700 Subject: [Facebooker-talk] REXML vs libxml In-Reply-To: References: <5a002f4a0810151444n47c8ce6dvf910e6d9de53be70@mail.gmail.com> Message-ID: <5a002f4a0810151616p28ddb11ev34928b2c9307ce06@mail.gmail.com> Thanks Mike, that's what I did. Ours is probably not what you'd consider a typical web application. We analyzes the user's facebook network extensively. A single request for user.friends! for a user with 900 friends takes almost 400s to run, almost 300 of which is spent doing this: REXML::Document#initialize To make matters worse, the current parser runes through REXML::Document#initialize twice, once in Errors.process, and another in the regular Parser.process In fact, a simple fix to Errors.process already shaved half of the 300s (commented was the original): class Errors < Parser#:nodoc: def self.process(data) data = data.body rescue data # either data or an HTTP response if data.include?('(\d+)<\/error_code>/.match(data) if matches error_code = matches[0] end matches = /(.*?)<\/error_msg>/.match(data) if matches error_msg = matches[0] end exception = EXCEPTIONS[error_code.to_i] || StandardError raise exception.new(error_msg) # response_element = element('error_response', data) rescue nil # if response_element # hash = hashinate(response_element) # exception = EXCEPTIONS[Integer(hash['error_code'])] || StandardError # raise exception.new(hash['error_msg']) # end else nil end end Not half as pretty, but a lot faster... On Wed, Oct 15, 2008 at 3:27 PM, Mike Mangino wrote: > > On Oct 15, 2008, at 5:44 PM, Yu-Shan Fung wrote: > > Hi all, >> >> I've been looking at the performance of my fb app and one glaring issue >> seems to be with the parsing speed of rexml in processing the results. Has >> anyone looked into porting the facebooker parser from rexml to libxml? If >> not, any reason I shouldn't try? >> > > Have you actually benchmarked this? If you have, and it is truly an issue > and you can make it transparent, go for it. I would be shocked if this is a > bottleneck for the typical web application. > > Mike > > > >> >> Thanks! >> Yu-Shan. >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/facebooker-talk >> > > -- > Mike Mangino > http://www.elevatedrails.com > > > > -- "Reality is that which, when you stop believing in it, doesn't go away." - Philip K. Dick, American Writer -------------- next part -------------- An HTML attachment was scrubbed... URL: From abrahams at gmail.com Wed Oct 15 21:02:36 2008 From: abrahams at gmail.com (Sean Abrahams) Date: Wed, 15 Oct 2008 18:02:36 -0700 Subject: [Facebooker-talk] REXML vs libxml In-Reply-To: <5a002f4a0810151616p28ddb11ev34928b2c9307ce06@mail.gmail.com> References: <5a002f4a0810151444n47c8ce6dvf910e6d9de53be70@mail.gmail.com> <5a002f4a0810151616p28ddb11ev34928b2c9307ce06@mail.gmail.com> Message-ID: REXML is notorious for its slowness. I would love to see libxml replace it in facebooker. Let me know if you would like any help. Cheers. On Wed, Oct 15, 2008 at 4:16 PM, Yu-Shan Fung wrote: > Thanks Mike, that's what I did. Ours is probably not what you'd consider a > typical web application. We analyzes the user's facebook network > extensively. A single request for user.friends! for a user with 900 friends > takes almost 400s to run, almost 300 of which is spent doing this: > REXML::Document#initialize > > To make matters worse, the current parser runes through > REXML::Document#initialize twice, once in Errors.process, and another in the > regular Parser.process > In fact, a simple fix to Errors.process already shaved half of the 300s > (commented was the original): > > class Errors < Parser#:nodoc: > def self.process(data) > data = data.body rescue data # either data or an HTTP response > if data.include?(' error_code = error_msg = nil > matches = /(\d+)<\/error_code>/.match(data) > if matches > error_code = matches[0] > end > matches = /(.*?)<\/error_msg>/.match(data) > if matches > error_msg = matches[0] > end > exception = EXCEPTIONS[error_code.to_i] || StandardError > raise exception.new(error_msg) > # response_element = element('error_response', data) rescue nil > # if response_element > # hash = hashinate(response_element) > # exception = EXCEPTIONS[Integer(hash['error_code'])] || > StandardError > # raise exception.new(hash['error_msg']) > # end > else > nil > end > end > > > Not half as pretty, but a lot faster... > > > > On Wed, Oct 15, 2008 at 3:27 PM, Mike Mangino > wrote: >> >> On Oct 15, 2008, at 5:44 PM, Yu-Shan Fung wrote: >> >>> Hi all, >>> >>> I've been looking at the performance of my fb app and one glaring issue >>> seems to be with the parsing speed of rexml in processing the results. Has >>> anyone looked into porting the facebooker parser from rexml to libxml? If >>> not, any reason I shouldn't try? >> >> Have you actually benchmarked this? If you have, and it is truly an issue >> and you can make it transparent, go for it. I would be shocked if this is a >> bottleneck for the typical web application. >> >> Mike >> >> >>> >>> >>> Thanks! >>> Yu-Shan. >>> _______________________________________________ >>> Facebooker-talk mailing list >>> Facebooker-talk at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/facebooker-talk >> >> -- >> Mike Mangino >> http://www.elevatedrails.com >> >> >> > > > > -- > "Reality is that which, when you stop believing in it, doesn't go away." > - Philip K. Dick, American Writer > > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > > From zhao.lu.us at gmail.com Thu Oct 16 03:26:16 2008 From: zhao.lu.us at gmail.com (Zhao Lu) Date: Thu, 16 Oct 2008 00:26:16 -0700 Subject: [Facebooker-talk] rspec test for fb controller Message-ID: Hi, I'm having some problem with a rspec test for facebook and I hope someone may be able to help me out. I wrote a very simple test for facebook_users_controller_spec: require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') include Facebooker::Rails::TestHelpers describe FacebookUsersController do describe "FBML requests" do describe "#new" do it "should succeed" do facebook_get :new response.should be_success end end end end and to make the test pass I have in facebook_users_controller: class FacebookUsersController < ApplicationController def new respond_to do |format| pp format format.html{} format.fbml { head ok } end end end The pp format in the controller gives: #[], "Cache-Control"=>"no-cache"}, @_params= {"format"=>"fbml", "fb_sig_time"=>1224027111.45693, "fb_sig"=>"ec765b71ae523c19003bd24755da0013", "action"=>"new", "fb_sig_in_canvas"=>"1", "fb_sig_session_key"=>"facebook_session_key", "canvas"=>true, "controller"=>"facebook_users", "fb_sig_expires"=>"0", "fb_sig_added"=>"1", "fb_sig_user"=>"1234"}, wrong number of arguments (1 for 0) /home/zlu/work/gifttophone/app/controllers/facebook_users_controller.rb:4:in `new' I'm not sure about the wrong number of arguments error, which happens on line "pp format". The error goes away if I comment out that line. But desert is having trouble with fbml being the mime type. As far as I can tell, the _params hash, which has an underscore and don't know why, has "format" set to "xml". This is the error: TEST_FAILED% should succeed time=0.390875 message=Constant Mime::FBML from mime/fbml.rb not found Constant FBML from fbml.rb not found location=/home/zlu/work/gifttophone/config/../vendor/desert/lib/desert/rails/dependencies.rb:56:in `look_for_constant_in_parent_module' 1) NameError in 'FacebookUsersController FBML requests#new should succeed' Constant Mime::FBML from mime/fbml.rb not found Constant FBML from fbml.rb not found /home/zlu/work/gifttophone/config/../vendor/desert/lib/desert/rails/dependencies.rb:56:in `look_for_constant_in_parent_module' /home/zlu/work/gifttophone/config/../vendor/desert/lib/desert/rails/dependencies.rb:13:in `load_missing_constant' /home/zlu/work/gifttophone/app/controllers/facebook_users_controller.rb:5:in `new' /home/zlu/work/gifttophone/app/controllers/facebook_users_controller.rb:3:in `new' /home/zlu/work/gifttophone/vendor/plugins/user/lib/user_based_security.rb:13:in `perform_action_without_filters' /home/zlu/work/gifttophone/vendor/plugins/pivotal_core_bundle/lib/rails_core_extensions/url_writer_retardase_inhibitor.rb:22:in `inhibit_retardase' /home/zlu/work/gifttophone/vendor/plugins/pivotal_core_bundle/lib/rails_core_extensions/url_writer_retardase_inhibitor.rb:22:in `inhibit_retardase' /home/zlu/work/gifttophone/vendor/plugins/pivotal_core_bundle/lib/rails_core_extensions/url_writer_retardase_inhibitor.rb:22:in `inhibit_retardase' /home/zlu/work/gifttophone/vendor/plugins/user/lib/store_location.rb:23:in `store_location' /home/zlu/work/gifttophone/vendor/plugins/user/lib/current_user.rb:49:in `perform_action' /home/zlu/work/gifttophone/vendor/plugins/facebooker/lib/facebooker/rails/test_helpers.rb:34:in `send' /home/zlu/work/gifttophone/vendor/plugins/facebooker/lib/facebooker/rails/test_helpers.rb:34:in `facebook_verb' /home/zlu/work/gifttophone/vendor/plugins/facebooker/lib/facebooker/rails/test_helpers.rb:15:in `facebook_get' /home/zlu/work/gifttophone/spec/controllers/facebook_users_controller_spec.rb:8: Finished in 0.630094 seconds Any idea would be appreciated. -- Zhao From stephane.akkaoui at imeuble.info Thu Oct 16 04:00:04 2008 From: stephane.akkaoui at imeuble.info (=?ISO-8859-1?Q?St=E9phane_Akkaoui?=) Date: Thu, 16 Oct 2008 10:00:04 +0200 Subject: [Facebooker-talk] rspec test for fb controller In-Reply-To: References: Message-ID: I remember that for having my rspec test to passe, I had to add this line in the config/initializers/mime_types.rb file : Mime::Type.register 'text/html', :fbml Also, in my routing specs, changing lines like params_from(:post, "/model").should == {:controller => "model", :action => "create"} params_from(:get, "/model/1/edit").should == {:controller => "model", :action => "edit", :id => "1"} by something like : params_from(:post, "/model/create").should == {:controller => "model", :action => "create"} params_from(:get, "/model/edit/1").should == {:controller => "model", :action => "edit", :id => "1"} Facebooker rewrite rules because of the POST http verb matter. But take care of this, I just made this to keep moving and having my specs to pass. I don't know if it's the best way to do. I may have broke something else. I was planning to work better on this in the comming weeks. If someone has a better way to do, let us know ! ;-) HTH, -- St?phane Akkaoui http://www.sociabliz.com [fr] http://www.imeuble.info [fr] Le 16 oct. 08 ? 09:26, Zhao Lu a ?crit : > Hi, > > I'm having some problem with a rspec test for facebook and I hope > someone may be able to help me out. > > I wrote a very simple test for facebook_users_controller_spec: > > require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') > include Facebooker::Rails::TestHelpers > > describe FacebookUsersController do > describe "FBML requests" do > describe "#new" do > it "should succeed" do > facebook_get :new > response.should be_success > end > end > end > end > > and to make the test pass I have in facebook_users_controller: > > class FacebookUsersController < ApplicationController > def new > respond_to do |format| > pp format > format.html{} > format.fbml { head ok } > end > end > end > > > The pp format in the controller gives: > > # @controller= > # @_cookies={}, > @_flash={}, > @_headers={"cookie"=>[], "Cache-Control"=>"no-cache"}, > @_params= > {"format"=>"fbml", > "fb_sig_time"=>1224027111.45693, > "fb_sig"=>"ec765b71ae523c19003bd24755da0013", > "action"=>"new", > "fb_sig_in_canvas"=>"1", > "fb_sig_session_key"=>"facebook_session_key", > "canvas"=>true, > "controller"=>"facebook_users", > "fb_sig_expires"=>"0", > "fb_sig_added"=>"1", > "fb_sig_user"=>"1234"}, > wrong number of arguments (1 for 0) > /home/zlu/work/gifttophone/app/controllers/ > facebook_users_controller.rb:4:in > `new' > > I'm not sure about the wrong number of arguments error, which happens > on line "pp format". The error goes away if I comment out that line. > But desert is having trouble with fbml being the mime type. As far as > I can tell, the _params hash, which has an underscore and don't know > why, has "format" set to "xml". > > This is the error: > > TEST_FAILED% should succeed time=0.390875 message=Constant Mime::FBML > from mime/fbml.rb not found > Constant FBML from fbml.rb not found > location=/home/zlu/work/gifttophone/config/../vendor/desert/lib/ > desert/rails/dependencies.rb:56:in > `look_for_constant_in_parent_module' > > > 1) > NameError in 'FacebookUsersController FBML requests#new should > succeed' > Constant Mime::FBML from mime/fbml.rb not found > Constant FBML from fbml.rb not found > /home/zlu/work/gifttophone/config/../vendor/desert/lib/desert/rails/ > dependencies.rb:56:in > `look_for_constant_in_parent_module' > /home/zlu/work/gifttophone/config/../vendor/desert/lib/desert/rails/ > dependencies.rb:13:in > `load_missing_constant' > /home/zlu/work/gifttophone/app/controllers/ > facebook_users_controller.rb:5:in > `new' > /home/zlu/work/gifttophone/app/controllers/ > facebook_users_controller.rb:3:in > `new' > /home/zlu/work/gifttophone/vendor/plugins/user/lib/ > user_based_security.rb:13:in > `perform_action_without_filters' > /home/zlu/work/gifttophone/vendor/plugins/pivotal_core_bundle/lib/ > rails_core_extensions/url_writer_retardase_inhibitor.rb:22:in > `inhibit_retardase' > /home/zlu/work/gifttophone/vendor/plugins/pivotal_core_bundle/lib/ > rails_core_extensions/url_writer_retardase_inhibitor.rb:22:in > `inhibit_retardase' > /home/zlu/work/gifttophone/vendor/plugins/pivotal_core_bundle/lib/ > rails_core_extensions/url_writer_retardase_inhibitor.rb:22:in > `inhibit_retardase' > /home/zlu/work/gifttophone/vendor/plugins/user/lib/store_location.rb: > 23:in > `store_location' > /home/zlu/work/gifttophone/vendor/plugins/user/lib/current_user.rb: > 49:in > `perform_action' > /home/zlu/work/gifttophone/vendor/plugins/facebooker/lib/facebooker/ > rails/test_helpers.rb:34:in > `send' > /home/zlu/work/gifttophone/vendor/plugins/facebooker/lib/facebooker/ > rails/test_helpers.rb:34:in > `facebook_verb' > /home/zlu/work/gifttophone/vendor/plugins/facebooker/lib/facebooker/ > rails/test_helpers.rb:15:in > `facebook_get' > /home/zlu/work/gifttophone/spec/controllers/ > facebook_users_controller_spec.rb:8: > > Finished in 0.630094 seconds > > Any idea would be appreciated. > > -- > Zhao > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk From mmangino at elevatedrails.com Thu Oct 16 08:49:20 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Thu, 16 Oct 2008 08:49:20 -0400 Subject: [Facebooker-talk] REXML vs libxml In-Reply-To: <5a002f4a0810151616p28ddb11ev34928b2c9307ce06@mail.gmail.com> References: <5a002f4a0810151444n47c8ce6dvf910e6d9de53be70@mail.gmail.com> <5a002f4a0810151616p28ddb11ev34928b2c9307ce06@mail.gmail.com> Message-ID: <007C3BF3-0F5A-4A5F-A9D8-415FDCBBBC44@elevatedrails.com> On Oct 15, 2008, at 7:16 PM, Yu-Shan Fung wrote: > Thanks Mike, that's what I did. Ours is probably not what you'd > consider a typical web application. We analyzes the user's facebook > network extensively. A single request for user.friends! for a user > with 900 friends takes almost 400s to run, almost 300 of which is > spent doing this: > REXML::Document#initialize > Ah, okay. That sounds like something worth fixing. > To make matters worse, the current parser runes through > REXML::Document#initialize twice, once in Errors.process, and > another in the regular Parser.process > In fact, a simple fix to Errors.process already shaved half of the > 300s (commented was the original): > Do you have this as a commit in a fork on github? If so, I can pull this in. I would like to see the error code handling pulled out in functions like extract_error_code and extract_error_message, but other than that, this looks good. Mike > class Errors < Parser#:nodoc: > def self.process(data) > data = data.body rescue data # either data or an HTTP response > if data.include?(' error_code = error_msg = nil > matches = /(\d+)<\/error_code>/.match(data) > if matches > error_code = matches[0] > end > matches = /(.*?)<\/error_msg>/.match(data) > if matches > error_msg = matches[0] > end > exception = EXCEPTIONS[error_code.to_i] || StandardError > raise exception.new(error_msg) > # response_element = element('error_response', data) rescue nil > # if response_element > # hash = hashinate(response_element) > # exception = EXCEPTIONS[Integer(hash['error_code'])] || > StandardError > # raise exception.new(hash['error_msg']) > # end > else > nil > end > end > > > Not half as pretty, but a lot faster... > > > > On Wed, Oct 15, 2008 at 3:27 PM, Mike Mangino > wrote: > > On Oct 15, 2008, at 5:44 PM, Yu-Shan Fung wrote: > > Hi all, > > I've been looking at the performance of my fb app and one glaring > issue seems to be with the parsing speed of rexml in processing the > results. Has anyone looked into porting the facebooker parser from > rexml to libxml? If not, any reason I shouldn't try? > > Have you actually benchmarked this? If you have, and it is truly an > issue and you can make it transparent, go for it. I would be shocked > if this is a bottleneck for the typical web application. > > Mike > > > > > Thanks! > Yu-Shan. > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > > -- > Mike Mangino > http://www.elevatedrails.com > > > > > > > -- > "Reality is that which, when you stop believing in it, doesn't go > away." > - Philip K. Dick, American Writer -- Mike Mangino http://www.elevatedrails.com From dara at catch.fm Thu Oct 16 12:29:21 2008 From: dara at catch.fm (dara) Date: Thu, 16 Oct 2008 17:29:21 +0100 Subject: [Facebooker-talk] Signature failure during setRefHandle when umlaut'd character used Message-ID: <48F76BE1.1080108@catch.fm> If I send a profile update via a ref handle and the update contains the character "?" (a-umlaut), I get an Signature error back from Bebo. If I remove that character, all is ok. The error returned is: 104 Invalid signature ---snip--- Has anybody else seen this behaviour ? I suspect this is an issue in the plugin signature code perhaps? I have create a little test app in Java to talk direct to the WebService and both calls (with and without a-umlaut) return without issue. Still looking... From mmangino at elevatedrails.com Thu Oct 16 13:50:01 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Thu, 16 Oct 2008 13:50:01 -0400 Subject: [Facebooker-talk] Signature failure during setRefHandle when umlaut'd character used In-Reply-To: <48F76BE1.1080108@catch.fm> References: <48F76BE1.1080108@catch.fm> Message-ID: <7C930D79-0B5F-4E4A-A1CB-72C124B58E5E@elevatedrails.com> On Oct 16, 2008, at 12:29 PM, dara wrote: > If I send a profile update via a ref handle and the update contains > the character "?" (a-umlaut), I get an Signature error back from Bebo. > > If I remove that character, all is ok. > > The error returned is: > > > > 104 > Invalid signature > > ---snip--- > > > > > Has anybody else seen this behaviour ? > > I suspect this is an issue in the plugin signature code perhaps? It's really hard to tell without any detail. A stack trace and enough information to calculate the signature would be helpful. Where is the ? character? Very few things are signed. Are you using the right KCODE in rails? Mike > > > I have create a little test app in Java to talk direct to the > WebService and both calls (with and without a-umlaut) return without > issue. > > Still looking... > > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk -- Mike Mangino http://www.elevatedrails.com From dennymontoya at gmail.com Fri Oct 17 05:24:14 2008 From: dennymontoya at gmail.com (Denny Montoya) Date: Fri, 17 Oct 2008 02:24:14 -0700 Subject: [Facebooker-talk] postback url Message-ID: Hey everyone. Having trouble with setting up a postback url for the suber rewards service. There are no instructions on how to setup a controller route etc, with their service, and their support on their forums online is not responding. Using there no-api iframe works, but i have no idea how to setup a postback url that responds for a successful postback. I get this error: Warning! The connection to your page was successful, however you did not return a "1" to show that you have received it which may result in missed offers. Is it not possible to test this in development mode while tunneling into my server? I assume all it takes is creating a controller and a routes, but after many attempts I dont know what to do anymore. Any help? Denny -------------- next part -------------- An HTML attachment was scrubbed... URL: From joe at pinkpucker.net Fri Oct 17 11:37:38 2008 From: joe at pinkpucker.net (Joe Van Dyk) Date: Fri, 17 Oct 2008 08:37:38 -0700 Subject: [Facebooker-talk] Error when posting facebook.feed.publishActionOfUser Message-ID: posting 'facebook.feed.publishActionOfUser' with {:title=>" ", "image_1_link"=>"http://apps.facebook.com/dailycaption/captions/1273", :body=>" \"I will be one with the bucket.\". Think you can do better? Write your own caption! ", "image_1"=>"http://farm1.static.flickr.com/177/385463169_c98233cd12.jpg"} NoMethodError: undefined method `new' for nil:NilClass from /data/dailycaption/releases/20081017040804/vendor/plugins/facebooker/lib/facebooker/parser.rb:405:in `process' from /data/dailycaption/releases/20081017040804/vendor/plugins/facebooker/lib/facebooker/parser.rb:15:in `parse' from /data/dailycaption/releases/20081017040804/vendor/plugins/facebooker/lib/facebooker/service.rb:13:in `post' from /data/dailycaption/releases/20081017040804/vendor/plugins/facebooker/lib/facebooker/session.rb:412:in `post' from /data/dailycaption/releases/20081017040804/vendor/plugins/facebooker/lib/facebooker/models/user.rb:242:in `publish' from /data/dailycaption/releases/20081017040804/vendor/plugins/facebooker/lib/facebooker/models/user.rb:114:in `publish_action' from /data/dailycaption/releases/20081017040804/vendor/plugins/facebooker/lib/facebooker/rails/publisher.rb:169:in `send_message' from /data/dailycaption/releases/20081017040804/vendor/plugins/facebooker/lib/facebooker/rails/publisher.rb:259:in `method_missing' from (irb):1 Looks like it received an unexpected error response from facebook. I should probably update the plugin, right? Joe From digidigo at gmail.com Fri Oct 17 11:41:36 2008 From: digidigo at gmail.com (David Clements) Date: Fri, 17 Oct 2008 09:41:36 -0600 Subject: [Facebooker-talk] Error when posting facebook.feed.publishActionOfUser In-Reply-To: References: Message-ID: I had this happen yesterday... Facebook has finally deprecated some calls and there is an error message mising.. I am not running the current facebooker code right now so I am not sure if this problem exists there or not.. I got around that exception by changing parser.rb def self.process(data) response_element = element('error_response', data) rescue nil if response_element hash = hashinate(response_element) puts "Got an exception #{hash['error_code']} || #{hash['error_msg']} " begin raise EXCEPTIONS[Integer(hash['error_code'])].new(hash['error_msg']) rescue throw hash['error_msg'] end end end This will uncover another error for you which will then force you to move to the the new publisher templates. Dave On Fri, Oct 17, 2008 at 9:37 AM, Joe Van Dyk wrote: > posting 'facebook.feed.publishActionOfUser' with {:title=>" > ", > "image_1_link"=>"http://apps.facebook.com/dailycaption/captions/1273", > :body=>" \" href=\"http://apps.facebook.com/dailycaption/captions/1273\">I > will be > one with the bucket.\". Think you can do better? href=\"http://apps.facebook.com/dailycaption/captions/new\">Write > your > own caption! ", > "image_1"=>"http://farm1.static.flickr.com/177/385463169_c98233cd12.jpg"} > > NoMethodError: undefined method `new' for nil:NilClass > from > /data/dailycaption/releases/20081017040804/vendor/plugins/facebooker/lib/facebooker/parser.rb:405:in > `process' > from > /data/dailycaption/releases/20081017040804/vendor/plugins/facebooker/lib/facebooker/parser.rb:15:in > `parse' > from > /data/dailycaption/releases/20081017040804/vendor/plugins/facebooker/lib/facebooker/service.rb:13:in > `post' > from > /data/dailycaption/releases/20081017040804/vendor/plugins/facebooker/lib/facebooker/session.rb:412:in > `post' > from > /data/dailycaption/releases/20081017040804/vendor/plugins/facebooker/lib/facebooker/models/user.rb:242:in > `publish' > from > /data/dailycaption/releases/20081017040804/vendor/plugins/facebooker/lib/facebooker/models/user.rb:114:in > `publish_action' > from > /data/dailycaption/releases/20081017040804/vendor/plugins/facebooker/lib/facebooker/rails/publisher.rb:169:in > `send_message' > from > /data/dailycaption/releases/20081017040804/vendor/plugins/facebooker/lib/facebooker/rails/publisher.rb:259:in > `method_missing' > from (irb):1 > > > Looks like it received an unexpected error response from facebook. I > should probably update the plugin, right? > > Joe > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mmangino at elevatedrails.com Fri Oct 17 11:49:40 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Fri, 17 Oct 2008 11:49:40 -0400 Subject: [Facebooker-talk] Error when posting facebook.feed.publishActionOfUser In-Reply-To: References: Message-ID: <1D6F0F7B-36D4-46EF-A9CC-64C7E70B6051@elevatedrails.com> On Oct 17, 2008, at 11:37 AM, Joe Van Dyk wrote: > posting 'facebook.feed.publishActionOfUser' with {:title=>" > ", > "image_1_link"=>"http://apps.facebook.com/dailycaption/captions/1273", > :body=>" \" href=\"http://apps.facebook.com/dailycaption/captions/1273\">I will be > one with the bucket.\". Think you can do better? href=\"http://apps.facebook.com/dailycaption/captions/new\">Write your > own caption! ", > "image_1"=>"http://farm1.static.flickr.com/177/385463169_c98233cd12.jpg > "} > > NoMethodError: undefined method `new' for nil:NilClass > from /data/dailycaption/releases/20081017040804/vendor/plugins/ > facebooker/lib/facebooker/parser.rb:405:in > `process' > from /data/dailycaption/releases/20081017040804/vendor/plugins/ > facebooker/lib/facebooker/parser.rb:15:in > `parse' > from /data/dailycaption/releases/20081017040804/vendor/plugins/ > facebooker/lib/facebooker/service.rb:13:in > `post' > from /data/dailycaption/releases/20081017040804/vendor/plugins/ > facebooker/lib/facebooker/session.rb:412:in > `post' > from /data/dailycaption/releases/20081017040804/vendor/plugins/ > facebooker/lib/facebooker/models/user.rb:242:in > `publish' > from /data/dailycaption/releases/20081017040804/vendor/plugins/ > facebooker/lib/facebooker/models/user.rb:114:in > `publish_action' > from /data/dailycaption/releases/20081017040804/vendor/plugins/ > facebooker/lib/facebooker/rails/publisher.rb:169:in > `send_message' > from /data/dailycaption/releases/20081017040804/vendor/plugins/ > facebooker/lib/facebooker/rails/publisher.rb:259:in > `method_missing' > from (irb):1 > > > Looks like it received an unexpected error response from facebook. I > should probably update the plugin, right? Yep! I think new versions will give you the error text instead of this ugly error. Mike > > > Joe > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk -- Mike Mangino http://www.elevatedrails.com From joe at pinkpucker.net Fri Oct 17 17:58:19 2008 From: joe at pinkpucker.net (Joe Van Dyk) Date: Fri, 17 Oct 2008 14:58:19 -0700 Subject: [Facebooker-talk] Error when posting facebook.feed.publishActionOfUser In-Reply-To: References: Message-ID: By "new publisher templates" -- you're referring to what facebooker sends facebook, right? So I'd want to upgrade facebooker? Or can I just use different fbml in my publisher methods? Joe On Fri, Oct 17, 2008 at 8:41 AM, David Clements wrote: > I had this happen yesterday... Facebook has finally deprecated some calls > and there is an error message mising.. > > I am not running the current facebooker code right now so I am not sure if > this problem exists there or not.. > > > I got around that exception by changing parser.rb > > def self.process(data) > response_element = element('error_response', data) rescue nil > if response_element > hash = hashinate(response_element) > puts "Got an exception #{hash['error_code']} || #{hash['error_msg']} > " > begin > raise EXCEPTIONS[Integer(hash['error_code'])].new(hash['error_msg']) > rescue > throw hash['error_msg'] > end > end > end > > This will uncover another error for you which will then force you to move to > the the new publisher templates. > > > Dave > > > On Fri, Oct 17, 2008 at 9:37 AM, Joe Van Dyk wrote: >> >> posting 'facebook.feed.publishActionOfUser' with {:title=>" >> ", >> "image_1_link"=>"http://apps.facebook.com/dailycaption/captions/1273", >> :body=>" \"> href=\"http://apps.facebook.com/dailycaption/captions/1273\">I will be >> one with the bucket.\". Think you can do better? > href=\"http://apps.facebook.com/dailycaption/captions/new\">Write your >> own caption! ", >> "image_1"=>"http://farm1.static.flickr.com/177/385463169_c98233cd12.jpg"} >> >> NoMethodError: undefined method `new' for nil:NilClass >> from >> /data/dailycaption/releases/20081017040804/vendor/plugins/facebooker/lib/facebooker/parser.rb:405:in >> `process' >> from >> /data/dailycaption/releases/20081017040804/vendor/plugins/facebooker/lib/facebooker/parser.rb:15:in >> `parse' >> from >> /data/dailycaption/releases/20081017040804/vendor/plugins/facebooker/lib/facebooker/service.rb:13:in >> `post' >> from >> /data/dailycaption/releases/20081017040804/vendor/plugins/facebooker/lib/facebooker/session.rb:412:in >> `post' >> from >> /data/dailycaption/releases/20081017040804/vendor/plugins/facebooker/lib/facebooker/models/user.rb:242:in >> `publish' >> from >> /data/dailycaption/releases/20081017040804/vendor/plugins/facebooker/lib/facebooker/models/user.rb:114:in >> `publish_action' >> from >> /data/dailycaption/releases/20081017040804/vendor/plugins/facebooker/lib/facebooker/rails/publisher.rb:169:in >> `send_message' >> from >> /data/dailycaption/releases/20081017040804/vendor/plugins/facebooker/lib/facebooker/rails/publisher.rb:259:in >> `method_missing' >> from (irb):1 >> >> >> Looks like it received an unexpected error response from facebook. I >> should probably update the plugin, right? >> >> Joe >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/facebooker-talk > > From joe at pinkpucker.net Fri Oct 17 18:13:06 2008 From: joe at pinkpucker.net (Joe Van Dyk) Date: Fri, 17 Oct 2008 15:13:06 -0700 Subject: [Facebooker-talk] Error when posting facebook.feed.publishActionOfUser In-Reply-To: <4f6b19c0810171507je09a1e3v13ddc261bfeba32@mail.gmail.com> References: <4f6b19c0810171507je09a1e3v13ddc261bfeba32@mail.gmail.com> Message-ID: On Fri, Oct 17, 2008 at 3:07 PM, Chris Nolan.ca wrote: > On Fri, Oct 17, 2008 at 17:58, Joe Van Dyk wrote: >> By "new publisher templates" -- you're referring to what facebooker >> sends facebook, right? So I'd want to upgrade facebooker? Or can I >> just use different fbml in my publisher methods? >> >> Joe >> > > Joe, > > Sounds like you need to get up to speed on some of the 'new' stuff > facebook has... > Check out http://wiki.developers.facebook.com/index.php/New_Design_Integration_Guide > specifically http://wiki.developers.facebook.com/index.php/New_Design_Feed_Wall > > http://www.facebook.com/developers/#/developers/message.php?id=303 is > their after the fact announcement that they were turning it off -- try > we've had almost a year to get ready but... > > Chris Nolan.ca > http://pullbot.com/ Yup, that's definitely true. :D Haven't done anything Facebook related in a while. Thanks for the pointers. Joe From joe at pinkpucker.net Fri Oct 17 18:17:39 2008 From: joe at pinkpucker.net (Joe Van Dyk) Date: Fri, 17 Oct 2008 15:17:39 -0700 Subject: [Facebooker-talk] REXML vs libxml In-Reply-To: <5a002f4a0810151616p28ddb11ev34928b2c9307ce06@mail.gmail.com> References: <5a002f4a0810151444n47c8ce6dvf910e6d9de53be70@mail.gmail.com> <5a002f4a0810151616p28ddb11ev34928b2c9307ce06@mail.gmail.com> Message-ID: On Wed, Oct 15, 2008 at 4:16 PM, Yu-Shan Fung wrote: > Thanks Mike, that's what I did. Ours is probably not what you'd consider a > typical web application. We analyzes the user's facebook network > extensively. A single request for user.friends! for a user with 900 friends > takes almost 400s to run, almost 300 of which is spent doing this: > REXML::Document#initialize Really 400 seconds?! Yeesh. Joe From vincentchu at gmail.com Mon Oct 20 13:56:58 2008 From: vincentchu at gmail.com (vincent chu) Date: Mon, 20 Oct 2008 10:56:58 -0700 Subject: [Facebooker-talk] Facebooker Newsfeeds Message-ID: Hi all - I've been having some trouble registering newsfeed posts. I've been adapting the code used in the tutorial but have been getting some errors (see below). This is really strange because this code is essentially the same as some other code which I was able to run successfully. The error messages are pretty cryptic to me -- any suggestions? Thanks, Vince Here's what happens when I try to register a feed: >> FacebookUserPublisher.register_feed NoMethodError: undefined method `empty?' for 31659081545:Bignum from /Library/Ruby/Gems/1.8/gems/actionpack-2.1.1/lib/action_controller/vendor/html-scanner/html/sanitizer.rb:9:in `sanitizeable?' from /Library/Ruby/Gems/1.8/gems/actionpack-2.1.1/lib/action_controller/vendor/html-scanner/html/sanitizer.rb:4:in `sanitize' from /Library/Ruby/Gems/1.8/gems/actionpack-2.1.1/lib/action_controller/vendor/html-scanner/html/sanitizer.rb:30:in `sanitize' from /Users/vincentc/projects/rails/src-posterous/posterous-facebook/vendor/plugins/xss_terminate/lib/xss_terminate.rb:40:in `sanitize_fields' from /Users/vincentc/projects/rails/src-posterous/posterous-facebook/vendor/plugins/xss_terminate/lib/xss_terminate.rb:27:in `each' from /Users/vincentc/projects/rails/src-posterous/posterous-facebook/vendor/plugins/xss_terminate/lib/xss_terminate.rb:27:in `sanitize_fields' from /Library/Ruby/Gems/1.8/gems/activesupport-2.1.1/lib/active_support/callbacks.rb:173:in `send' from /Library/Ruby/Gems/1.8/gems/activesupport-2.1.1/lib/active_support/callbacks.rb:173:in `evaluate_method' from /Library/Ruby/Gems/1.8/gems/activesupport-2.1.1/lib/active_support/callbacks.rb:161:in `call' from /Library/Ruby/Gems/1.8/gems/activesupport-2.1.1/lib/active_support/callbacks.rb:93:in `run' from /Library/Ruby/Gems/1.8/gems/activesupport-2.1.1/lib/active_support/callbacks.rb:92:in `each' from /Library/Ruby/Gems/1.8/gems/activesupport-2.1.1/lib/active_support/callbacks.rb:92:in `send' from /Library/Ruby/Gems/1.8/gems/activesupport-2.1.1/lib/active_support/callbacks.rb:92:in `run' from /Library/Ruby/Gems/1.8/gems/activesupport-2.1.1/lib/active_support/callbacks.rb:272:in `run_callbacks' from /Library/Ruby/Gems/1.8/gems/activerecord-2.1.1/lib/active_record/callbacks.rb:298:in `callback' from /Library/Ruby/Gems/1.8/gems/activerecord-2.1.1/lib/active_record/callbacks.rb:206:in `create_or_update' from /Library/Ruby/Gems/1.8/gems/activerecord-2.1.1/lib/active_record/base.rb:2211:in `save_without_validation' from /Library/Ruby/Gems/1.8/gems/activerecord-2.1.1/lib/active_record/validations.rb:911:in `save_without_dirty' from /Library/Ruby/Gems/1.8/gems/activerecord-2.1.1/lib/active_record/dirty.rb:75:in `save_without_transactions' from /Library/Ruby/Gems/1.8/gems/activerecord-2.1.1/lib/active_record/transactions.rb:106:in `save' from /Library/Ruby/Gems/1.8/gems/activerecord-2.1.1/lib/active_record/connection_adapters/abstract/database_statements.rb:66:in `transaction' from /Library/Ruby/Gems/1.8/gems/activerecord-2.1.1/lib/active_record/transactions.rb:79:in `transaction' from /Library/Ruby/Gems/1.8/gems/activerecord-2.1.1/lib/active_record/transactions.rb:98:in `transaction' from /Library/Ruby/Gems/1.8/gems/activerecord-2.1.1/lib/active_record/transactions.rb:106:in `save' from /Library/Ruby/Gems/1.8/gems/activerecord-2.1.1/lib/active_record/transactions.rb:118:in `rollback_active_record_state!' from /Library/Ruby/Gems/1.8/gems/activerecord-2.1.1/lib/active_record/transactions.rb:106:in `save' from /Library/Ruby/Gems/1.8/gems/activerecord-2.1.1/lib/active_record/validations.rb:932:in `update_attribute' from /Users/vincentc/projects/rails/src-posterous/posterous-facebook/vendor/plugins/facebooker/lib/facebooker/rails/publisher.rb:114:in `register' from /Users/vincentc/projects/rails/src-posterous/posterous-facebook/vendor/plugins/facebooker/lib/facebooker/rails/publisher.rb:371:in `method_missing' from (irb):9 from :0>> Here's the corresponding source code for the FacebookUserPublisher class: class FacebookUserPublisher < Facebooker::Rails::Publisher def feed_template # A shorter, less information dense template for facebook aggregation one_line_story_template "{*actor*} posted to his blog" end def feed(user) send_as :user_action from user.facebook_session.user data {} end def profile_update(fb_user) send_as :profile recipients fb_user profile_main render(:partial => "facebook_users/fb_profile", :assigns => {:fb_user => fb_user}) end end From jonathan.otto at gmail.com Tue Oct 21 09:35:19 2008 From: jonathan.otto at gmail.com (Jonathan Otto) Date: Tue, 21 Oct 2008 08:35:19 -0500 Subject: [Facebooker-talk] Facebooker Newsfeeds In-Reply-To: References: Message-ID: What else are you calling from your observer, or whatever is triggering this call? Also, looks like the xss_terminate pluginmight have something to do with it, try commenting out the xss_terminate hooks. On Mon, Oct 20, 2008 at 12:56 PM, vincent chu wrote: > Hi all - > > I've been having some trouble registering newsfeed posts. I've been > adapting the code used in the tutorial but have been getting some > errors (see below). This is really strange because this code is > essentially the same as some other code which I was able to run > successfully. The error messages are pretty cryptic to me -- any > suggestions? > > Thanks, > > Vince > > Here's what happens when I try to register a feed: > >>> FacebookUserPublisher.register_feed > NoMethodError: undefined method `empty?' for 31659081545:Bignum > from /Library/Ruby/Gems/1.8/gems/actionpack-2.1.1/lib/action_controller/vendor/html-scanner/html/sanitizer.rb:9:in > `sanitizeable?' > from /Library/Ruby/Gems/1.8/gems/actionpack-2.1.1/lib/action_controller/vendor/html-scanner/html/sanitizer.rb:4:in > `sanitize' > from /Library/Ruby/Gems/1.8/gems/actionpack-2.1.1/lib/action_controller/vendor/html-scanner/html/sanitizer.rb:30:in > `sanitize' > from /Users/vincentc/projects/rails/src-posterous/posterous-facebook/vendor/plugins/xss_terminate/lib/xss_terminate.rb:40:in > `sanitize_fields' > from /Users/vincentc/projects/rails/src-posterous/posterous-facebook/vendor/plugins/xss_terminate/lib/xss_terminate.rb:27:in > `each' > from /Users/vincentc/projects/rails/src-posterous/posterous-facebook/vendor/plugins/xss_terminate/lib/xss_terminate.rb:27:in > `sanitize_fields' > from /Library/Ruby/Gems/1.8/gems/activesupport-2.1.1/lib/active_support/callbacks.rb:173:in > `send' > from /Library/Ruby/Gems/1.8/gems/activesupport-2.1.1/lib/active_support/callbacks.rb:173:in > `evaluate_method' > from /Library/Ruby/Gems/1.8/gems/activesupport-2.1.1/lib/active_support/callbacks.rb:161:in > `call' > from /Library/Ruby/Gems/1.8/gems/activesupport-2.1.1/lib/active_support/callbacks.rb:93:in > `run' > from /Library/Ruby/Gems/1.8/gems/activesupport-2.1.1/lib/active_support/callbacks.rb:92:in > `each' > from /Library/Ruby/Gems/1.8/gems/activesupport-2.1.1/lib/active_support/callbacks.rb:92:in > `send' > from /Library/Ruby/Gems/1.8/gems/activesupport-2.1.1/lib/active_support/callbacks.rb:92:in > `run' > from /Library/Ruby/Gems/1.8/gems/activesupport-2.1.1/lib/active_support/callbacks.rb:272:in > `run_callbacks' > from /Library/Ruby/Gems/1.8/gems/activerecord-2.1.1/lib/active_record/callbacks.rb:298:in > `callback' > from /Library/Ruby/Gems/1.8/gems/activerecord-2.1.1/lib/active_record/callbacks.rb:206:in > `create_or_update' > from /Library/Ruby/Gems/1.8/gems/activerecord-2.1.1/lib/active_record/base.rb:2211:in > `save_without_validation' > from /Library/Ruby/Gems/1.8/gems/activerecord-2.1.1/lib/active_record/validations.rb:911:in > `save_without_dirty' > from /Library/Ruby/Gems/1.8/gems/activerecord-2.1.1/lib/active_record/dirty.rb:75:in > `save_without_transactions' > from /Library/Ruby/Gems/1.8/gems/activerecord-2.1.1/lib/active_record/transactions.rb:106:in > `save' > from /Library/Ruby/Gems/1.8/gems/activerecord-2.1.1/lib/active_record/connection_adapters/abstract/database_statements.rb:66:in > `transaction' > from /Library/Ruby/Gems/1.8/gems/activerecord-2.1.1/lib/active_record/transactions.rb:79:in > `transaction' > from /Library/Ruby/Gems/1.8/gems/activerecord-2.1.1/lib/active_record/transactions.rb:98:in > `transaction' > from /Library/Ruby/Gems/1.8/gems/activerecord-2.1.1/lib/active_record/transactions.rb:106:in > `save' > from /Library/Ruby/Gems/1.8/gems/activerecord-2.1.1/lib/active_record/transactions.rb:118:in > `rollback_active_record_state!' > from /Library/Ruby/Gems/1.8/gems/activerecord-2.1.1/lib/active_record/transactions.rb:106:in > `save' > from /Library/Ruby/Gems/1.8/gems/activerecord-2.1.1/lib/active_record/validations.rb:932:in > `update_attribute' > from /Users/vincentc/projects/rails/src-posterous/posterous-facebook/vendor/plugins/facebooker/lib/facebooker/rails/publisher.rb:114:in > `register' > from /Users/vincentc/projects/rails/src-posterous/posterous-facebook/vendor/plugins/facebooker/lib/facebooker/rails/publisher.rb:371:in > `method_missing' > from (irb):9 > from :0>> > > Here's the corresponding source code for the FacebookUserPublisher class: > > class FacebookUserPublisher < Facebooker::Rails::Publisher > > def feed_template > > # A shorter, less information dense template for facebook aggregation > one_line_story_template "{*actor*} posted to his blog" > > end > > def feed(user) > > send_as :user_action > from user.facebook_session.user > data {} > > end > > def profile_update(fb_user) > > send_as :profile > recipients fb_user > profile_main render(:partial => "facebook_users/fb_profile", > :assigns => {:fb_user => fb_user}) > > end > > > > > end > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > From mixonic at synitech.com Tue Oct 21 11:14:23 2008 From: mixonic at synitech.com (Matthew Beale) Date: Tue, 21 Oct 2008 11:14:23 -0400 Subject: [Facebooker-talk] profile_session_key from profile tabs Message-ID: <1224602063.9335.4.camel@localhost> Hi all, I see these params from facebook on a tab: {"fb_sig_in_profile_tab"=>"1", "fb_sig_profile_user"=>"1559509589", "fb_sig_time"=>"1224601699.3553", "format"=>"fbml", "fb_sig_in_new_facebook"=>"1", "fb_sig"=>"df9a509db691ac17da036b01202dc252", "fb_sig_locale"=>"en_US", "fb_sig_profile_session_key"=>"1:pEI5qu-68agmwp0lpabWl0vGIUmZBwkyRecQDB_ZjxxnZGcUGyHiG3vm1bYspm0k-1559509589", "_method"=>"GET", "fb_sig_in_canvas"=>"1", "fb_sig_request_method"=>"GET", "fb_sig_expires"=>"1224601759", "fb_sig_friends"=>"1282166695, 1542500342", "fb_sig_added"=>"1", "fb_sig_api_key"=>"9e5442026f33f426c611bd968d028006", "fb_sig_profile_update_time"=>"0"} And I also get nothing back from this: grep -R 'profile_session_key' vendor/plugins/facebooker/ Which seems to explain why I can't get a session from facebooker on tabs, it only looks for session_key, not profile_session_key. Does this seem accurate? I'm working on some code to create a session from a tab right now, I'll post it when it's wrapped. Just looking to see if I'm headed in the right direction. Thanks guys! -- Matthew Beale :: 607 227 0871 Resume & Portfolio @ http://madhatted.com From mmangino at elevatedrails.com Tue Oct 21 11:22:12 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Tue, 21 Oct 2008 11:22:12 -0400 Subject: [Facebooker-talk] profile_session_key from profile tabs In-Reply-To: <1224602063.9335.4.camel@localhost> References: <1224602063.9335.4.camel@localhost> Message-ID: <824EF1B8-8251-4333-A4A1-464CF18C6639@elevatedrails.com> On Oct 21, 2008, at 11:14 AM, Matthew Beale wrote: > Hi all, > > I see these params from facebook on a tab: > > {"fb_sig_in_profile_tab"=>"1", > "fb_sig_profile_user"=>"1559509589", > "fb_sig_time"=>"1224601699.3553", > "format"=>"fbml", > "fb_sig_in_new_facebook"=>"1", > "fb_sig"=>"df9a509db691ac17da036b01202dc252", > "fb_sig_locale"=>"en_US", > "fb_sig_profile_session_key > "= > > > "1 > :pEI5qu > -68agmwp0lpabWl0vGIUmZBwkyRecQDB_ZjxxnZGcUGyHiG3vm1bYspm0k > -1559509589", > "_method"=>"GET", > "fb_sig_in_canvas"=>"1", > "fb_sig_request_method"=>"GET", > "fb_sig_expires"=>"1224601759", > "fb_sig_friends"=>"1282166695, > 1542500342", > "fb_sig_added"=>"1", > "fb_sig_api_key"=>"9e5442026f33f426c611bd968d028006", > "fb_sig_profile_update_time"=>"0"} > > And I also get nothing back from this: > > grep -R 'profile_session_key' vendor/plugins/facebooker/ > > Which seems to explain why I can't get a session from facebooker on > tabs, it only looks for session_key, not profile_session_key. Does > this > seem accurate? I'm working on some code to create a session from a > tab > right now, I'll post it when it's wrapped. Just looking to see if I'm > headed in the right direction. The profile session is quite different from a normal session. It is read only and tied to the owner of the tab. Since the semantics are completely different from a normal session, we don't automatically create one. It might make sense to make a facebook_tab_session available or something similar. Any opinions? Mike > > > Thanks guys! > > -- > Matthew Beale :: 607 227 0871 > Resume & Portfolio @ http://madhatted.com > > _______________________________________________ > 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 Oct 22 10:44:42 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Wed, 22 Oct 2008 10:44:42 -0400 Subject: [Facebooker-talk] Action Links Message-ID: I just added support for the just announced action links to the Facebooker Publisher. Inside a template, you can use: def user_action_template one_line_story_template "{*actor*} is testing action links" action_links action_link("text of link {*template*}","{*url*}") end to add action links. Unfortunately, it doesn't look like Facebook is expanding the variables in the URL. If you are seeing the same thing, please vote for http://bugs.developers.facebook.com/show_bug.cgi?id=3541 Mike -- Mike Mangino http://www.elevatedrails.com From cviedmai at gmail.com Thu Oct 23 16:16:15 2008 From: cviedmai at gmail.com (Cristobal Viedma) Date: Thu, 23 Oct 2008 22:16:15 +0200 Subject: [Facebooker-talk] Facebooker::Session::MissingOrInvalidParameter Message-ID: Hi, I'm just new in facebooker but I am having a problem and I cannot find it answered before, so here I go. I tried to get the photos of a user and all the time I am getting this error: Facebooker::Session::MissingOrInvalidParameter in HolaController#index Invalid parameter vendor/plugins/facebooker/lib/facebooker/parser.rb:468:in `process' vendor/plugins/facebooker/lib/facebooker/parser.rb:15:in `parse' vendor/plugins/facebooker/lib/facebooker/service.rb:14:in `post' vendor/plugins/facebooker/lib/facebooker/session.rb:478:in `post_without_logging' vendor/plugins/facebooker/lib/facebooker/session.rb:489:in `post' .... What I am doing actually is just the following two lines in my controller: @user = facebook_session.user @photos = facebook_session.get_photos(:subj_id => @user.id) The one that is failing is the second one. I have also tried giving directly the id of the user: @photos = facebook_session.get_photos(:subj_id => anIDint) and still the same.. In my application controller I have the following: ensure_application_is_installed_by_facebook_user I know it must be something very stupid what I am doing... but I can't tell! does anyone know what's my error? Thanks, Cristobal Viedma From ambivalence at gmail.com Thu Oct 23 16:44:18 2008 From: ambivalence at gmail.com (Yu-Shan Fung) Date: Thu, 23 Oct 2008 13:44:18 -0700 Subject: [Facebooker-talk] Facebooker::Session::MissingOrInvalidParameter In-Reply-To: References: Message-ID: <5a002f4a0810231344k4a413d9auf4c0acbd23fffd2f@mail.gmail.com> Did you set your api_key and secret_key to the matching values for your app in config/facebooker.yml? That'd be the first thing I'd check. On Thu, Oct 23, 2008 at 1:16 PM, Cristobal Viedma wrote: > Hi, > > I'm just new in facebooker but I am having a problem and I cannot find > it answered before, so here I go. > I tried to get the photos of a user and all the time I am getting this > error: > > Facebooker::Session::MissingOrInvalidParameter in HolaController#index > Invalid parameter > vendor/plugins/facebooker/lib/facebooker/parser.rb:468:in `process' > vendor/plugins/facebooker/lib/facebooker/parser.rb:15:in `parse' > vendor/plugins/facebooker/lib/facebooker/service.rb:14:in `post' > vendor/plugins/facebooker/lib/facebooker/session.rb:478:in > `post_without_logging' > vendor/plugins/facebooker/lib/facebooker/session.rb:489:in `post' > .... > > What I am doing actually is just the following two lines in my controller: > > @user = facebook_session.user > @photos = facebook_session.get_photos(:subj_id => @user.id) > > The one that is failing is the second one. I have also tried giving > directly the id of the user: > @photos = facebook_session.get_photos(:subj_id => anIDint) > > and still the same.. > > In my application controller I have the following: > ensure_application_is_installed_by_facebook_user > > I know it must be something very stupid what I am doing... but I can't > tell! > > does anyone know what's my error? > > Thanks, > > Cristobal Viedma > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > -- "Reality is that which, when you stop believing in it, doesn't go away." - Philip K. Dick, American Writer -------------- next part -------------- An HTML attachment was scrubbed... URL: From cviedmai at gmail.com Thu Oct 23 16:49:54 2008 From: cviedmai at gmail.com (Cristobal Viedma) Date: Thu, 23 Oct 2008 22:49:54 +0200 Subject: [Facebooker-talk] Facebooker::Session::MissingOrInvalidParameter In-Reply-To: <5a002f4a0810231344k4a413d9auf4c0acbd23fffd2f@mail.gmail.com> References: <5a002f4a0810231344k4a413d9auf4c0acbd23fffd2f@mail.gmail.com> Message-ID: Yes yes, actually if I comment that line, I can put @user.name and stuff in my view and I can see it properly from facebook. Is just when I try to get the photos :S On Thu, Oct 23, 2008 at 10:44 PM, Yu-Shan Fung wrote: > Did you set your api_key and secret_key to the matching values for your app > in config/facebooker.yml? That'd be the first thing I'd check. > > > On Thu, Oct 23, 2008 at 1:16 PM, Cristobal Viedma > wrote: >> >> Hi, >> >> I'm just new in facebooker but I am having a problem and I cannot find >> it answered before, so here I go. >> I tried to get the photos of a user and all the time I am getting this >> error: >> >> Facebooker::Session::MissingOrInvalidParameter in HolaController#index >> Invalid parameter >> vendor/plugins/facebooker/lib/facebooker/parser.rb:468:in `process' >> vendor/plugins/facebooker/lib/facebooker/parser.rb:15:in `parse' >> vendor/plugins/facebooker/lib/facebooker/service.rb:14:in `post' >> vendor/plugins/facebooker/lib/facebooker/session.rb:478:in >> `post_without_logging' >> vendor/plugins/facebooker/lib/facebooker/session.rb:489:in `post' >> .... >> >> What I am doing actually is just the following two lines in my controller: >> >> @user = facebook_session.user >> @photos = facebook_session.get_photos(:subj_id => @user.id) >> >> The one that is failing is the second one. I have also tried giving >> directly the id of the user: >> @photos = facebook_session.get_photos(:subj_id => anIDint) >> >> and still the same.. >> >> In my application controller I have the following: >> ensure_application_is_installed_by_facebook_user >> >> I know it must be something very stupid what I am doing... but I can't >> tell! >> >> does anyone know what's my error? >> >> Thanks, >> >> Cristobal Viedma >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/facebooker-talk > > > > -- > "Reality is that which, when you stop believing in it, doesn't go away." > - Philip K. Dick, American Writer > From ambivalence at gmail.com Thu Oct 23 16:55:01 2008 From: ambivalence at gmail.com (Yu-Shan Fung) Date: Thu, 23 Oct 2008 13:55:01 -0700 Subject: [Facebooker-talk] Facebooker::Session::MissingOrInvalidParameter In-Reply-To: References: Message-ID: <5a002f4a0810231355p5d7fc071x2ab360129a6bd871@mail.gmail.com> I think you want @user.uid instead of @user.id On Thu, Oct 23, 2008 at 1:16 PM, Cristobal Viedma wrote: > Hi, > > I'm just new in facebooker but I am having a problem and I cannot find > it answered before, so here I go. > I tried to get the photos of a user and all the time I am getting this > error: > > Facebooker::Session::MissingOrInvalidParameter in HolaController#index > Invalid parameter > vendor/plugins/facebooker/lib/facebooker/parser.rb:468:in `process' > vendor/plugins/facebooker/lib/facebooker/parser.rb:15:in `parse' > vendor/plugins/facebooker/lib/facebooker/service.rb:14:in `post' > vendor/plugins/facebooker/lib/facebooker/session.rb:478:in > `post_without_logging' > vendor/plugins/facebooker/lib/facebooker/session.rb:489:in `post' > .... > > What I am doing actually is just the following two lines in my controller: > > @user = facebook_session.user > @photos = facebook_session.get_photos(:subj_id => @user.id) > > The one that is failing is the second one. I have also tried giving > directly the id of the user: > @photos = facebook_session.get_photos(:subj_id => anIDint) > > and still the same.. > > In my application controller I have the following: > ensure_application_is_installed_by_facebook_user > > I know it must be something very stupid what I am doing... but I can't > tell! > > does anyone know what's my error? > > Thanks, > > Cristobal Viedma > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > -- "Reality is that which, when you stop believing in it, doesn't go away." - Philip K. Dick, American Writer -------------- next part -------------- An HTML attachment was scrubbed... URL: From cviedmai at gmail.com Thu Oct 23 17:02:16 2008 From: cviedmai at gmail.com (Cristobal Viedma) Date: Thu, 23 Oct 2008 23:02:16 +0200 Subject: [Facebooker-talk] Facebooker::Session::MissingOrInvalidParameter In-Reply-To: <5a002f4a0810231355p5d7fc071x2ab360129a6bd871@mail.gmail.com> References: <5a002f4a0810231355p5d7fc071x2ab360129a6bd871@mail.gmail.com> Message-ID: oh, I wrote it wrong, but I get the same problem, and also as I said I tried putting directly my uid (both in integer or string) and same error. Here you can find the full trace: Facebooker::Session::MissingOrInvalidParameter in HolaController#index Invalid parameter RAILS_ROOT: /home/chris/workspace-Aptana/cool-hunters Application Trace | Framework Trace | Full Trace vendor/plugins/facebooker/lib/facebooker/parser.rb:468:in `process' vendor/plugins/facebooker/lib/facebooker/parser.rb:15:in `parse' vendor/plugins/facebooker/lib/facebooker/service.rb:14:in `post' vendor/plugins/facebooker/lib/facebooker/session.rb:478:in `post_without_logging' vendor/plugins/facebooker/lib/facebooker/session.rb:489:in `post' vendor/plugins/facebooker/lib/facebooker/logging.rb:16:in `log_fb_api' /usr/lib/ruby/1.8/benchmark.rb:293:in `measure' /usr/lib/ruby/1.8/benchmark.rb:307:in `realtime' vendor/plugins/facebooker/lib/facebooker/logging.rb:16:in `log_fb_api' vendor/plugins/facebooker/lib/facebooker/session.rb:488:in `post' vendor/plugins/facebooker/lib/facebooker/session.rb:272:in `get_photos' app/controllers/hola_controller.rb:5:in `index' /var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:1158:in `send' /var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:1158:in `perform_action_without_filters' /var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/filters.rb:697:in `call_filters' /var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/filters.rb:689:in `perform_action_without_benchmark' /var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue' /var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue' /var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/rescue.rb:199:in `perform_action_without_caching' /var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/caching.rb:678:in `perform_action' /var/lib/gems/1.8/gems/activerecord-2.0.2-/lib/active_record/connection_adapters/abstract/query_cache.rb:33:in `cache' /var/lib/gems/1.8/gems/activerecord-2.0.2-/lib/active_record/query_cache.rb:8:in `cache' /var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/caching.rb:677:in `perform_action' /var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:524:in `send' /var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:524:in `process_without_filters' /var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/filters.rb:685:in `process_without_session_management_support' /var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/session_management.rb:123:in `process' /var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:388:in `process' /var/lib/gems/1.8/gems/rails-2.0.2-/lib/webrick_server.rb:78:in `service' /var/lib/gems/1.8/gems/rails-2.0.2-/lib/commands/servers/webrick.rb:66 /var/lib/gems/1.8/gems/activesupport-2.0.2-/lib/active_support/dependencies.rb:496:in `require' /var/lib/gems/1.8/gems/activesupport-2.0.2-/lib/active_support/dependencies.rb:342:in `new_constants_in' /var/lib/gems/1.8/gems/activesupport-2.0.2-/lib/active_support/dependencies.rb:496:in `require' /var/lib/gems/1.8/gems/rails-2.0.2-/lib/commands/server.rb:39 -e:2:in `load' -e:2 On Thu, Oct 23, 2008 at 10:55 PM, Yu-Shan Fung wrote: > I think you want @user.uid instead of @user.id > > On Thu, Oct 23, 2008 at 1:16 PM, Cristobal Viedma > wrote: >> >> Hi, >> >> I'm just new in facebooker but I am having a problem and I cannot find >> it answered before, so here I go. >> I tried to get the photos of a user and all the time I am getting this >> error: >> >> Facebooker::Session::MissingOrInvalidParameter in HolaController#index >> Invalid parameter >> vendor/plugins/facebooker/lib/facebooker/parser.rb:468:in `process' >> vendor/plugins/facebooker/lib/facebooker/parser.rb:15:in `parse' >> vendor/plugins/facebooker/lib/facebooker/service.rb:14:in `post' >> vendor/plugins/facebooker/lib/facebooker/session.rb:478:in >> `post_without_logging' >> vendor/plugins/facebooker/lib/facebooker/session.rb:489:in `post' >> .... >> >> What I am doing actually is just the following two lines in my controller: >> >> @user = facebook_session.user >> @photos = facebook_session.get_photos(:subj_id => @user.id) >> >> The one that is failing is the second one. I have also tried giving >> directly the id of the user: >> @photos = facebook_session.get_photos(:subj_id => anIDint) >> >> and still the same.. >> >> In my application controller I have the following: >> ensure_application_is_installed_by_facebook_user >> >> I know it must be something very stupid what I am doing... but I can't >> tell! >> >> does anyone know what's my error? >> >> Thanks, >> >> Cristobal Viedma >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/facebooker-talk > > > > -- > "Reality is that which, when you stop believing in it, doesn't go away." > - Philip K. Dick, American Writer > From sam.clearman at gmail.com Thu Oct 23 18:56:32 2008 From: sam.clearman at gmail.com (Sam Clearman) Date: Thu, 23 Oct 2008 18:56:32 -0400 Subject: [Facebooker-talk] why does ensure_authenticated_to_facebook request app install? Message-ID: <9faa4c0d0810231556mbd42ecq547df1ba808dbdc0@mail.gmail.com> When I get redirected by ensure_authenticated_to_facebook it asks me to install the application.. is this by design? I just want to make sure the user is actually logged in to facebook. From jonathan.otto at gmail.com Fri Oct 24 14:52:11 2008 From: jonathan.otto at gmail.com (Jonathan Otto) Date: Fri, 24 Oct 2008 13:52:11 -0500 Subject: [Facebooker-talk] Facebooker::Session::MissingOrInvalidParameter In-Reply-To: References: <5a002f4a0810231355p5d7fc071x2ab360129a6bd871@mail.gmail.com> Message-ID: Here is the method signature of get_photos() def get_photos(pids = nil, subj_id = nil, aid = nil) It does not appear to take a hash as a list of arguments. Since you indicate that you want to use the subject_id (which finds photos tagged with that user) try passing nil for the first parameter. @photos = facebook_session.get_photos(nil, @user.uid) On Thu, Oct 23, 2008 at 4:02 PM, Cristobal Viedma wrote: > oh, I wrote it wrong, but I get the same problem, and also as I said I > tried putting directly my uid (both in integer or string) and same > error. > > Here you can find the full trace: > > Facebooker::Session::MissingOrInvalidParameter in HolaController#index > > Invalid parameter > > RAILS_ROOT: /home/chris/workspace-Aptana/cool-hunters > Application Trace | Framework Trace | Full Trace > > vendor/plugins/facebooker/lib/facebooker/parser.rb:468:in `process' > vendor/plugins/facebooker/lib/facebooker/parser.rb:15:in `parse' > vendor/plugins/facebooker/lib/facebooker/service.rb:14:in `post' > vendor/plugins/facebooker/lib/facebooker/session.rb:478:in > `post_without_logging' > vendor/plugins/facebooker/lib/facebooker/session.rb:489:in `post' > vendor/plugins/facebooker/lib/facebooker/logging.rb:16:in `log_fb_api' > /usr/lib/ruby/1.8/benchmark.rb:293:in `measure' > /usr/lib/ruby/1.8/benchmark.rb:307:in `realtime' > vendor/plugins/facebooker/lib/facebooker/logging.rb:16:in `log_fb_api' > vendor/plugins/facebooker/lib/facebooker/session.rb:488:in `post' > vendor/plugins/facebooker/lib/facebooker/session.rb:272:in `get_photos' > app/controllers/hola_controller.rb:5:in `index' > /var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:1158:in > `send' > /var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:1158:in > `perform_action_without_filters' > /var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/filters.rb:697:in > `call_filters' > /var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/filters.rb:689:in > `perform_action_without_benchmark' > /var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/benchmarking.rb:68:in > `perform_action_without_rescue' > /var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/benchmarking.rb:68:in > `perform_action_without_rescue' > /var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/rescue.rb:199:in > `perform_action_without_caching' > /var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/caching.rb:678:in > `perform_action' > /var/lib/gems/1.8/gems/activerecord-2.0.2-/lib/active_record/connection_adapters/abstract/query_cache.rb:33:in > `cache' > /var/lib/gems/1.8/gems/activerecord-2.0.2-/lib/active_record/query_cache.rb:8:in > `cache' > /var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/caching.rb:677:in > `perform_action' > /var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:524:in > `send' > /var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:524:in > `process_without_filters' > /var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/filters.rb:685:in > `process_without_session_management_support' > /var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/session_management.rb:123:in > `process' > /var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:388:in > `process' > /var/lib/gems/1.8/gems/rails-2.0.2-/lib/webrick_server.rb:78:in `service' > /var/lib/gems/1.8/gems/rails-2.0.2-/lib/commands/servers/webrick.rb:66 > /var/lib/gems/1.8/gems/activesupport-2.0.2-/lib/active_support/dependencies.rb:496:in > `require' > /var/lib/gems/1.8/gems/activesupport-2.0.2-/lib/active_support/dependencies.rb:342:in > `new_constants_in' > /var/lib/gems/1.8/gems/activesupport-2.0.2-/lib/active_support/dependencies.rb:496:in > `require' > /var/lib/gems/1.8/gems/rails-2.0.2-/lib/commands/server.rb:39 > -e:2:in `load' > -e:2 > > > > On Thu, Oct 23, 2008 at 10:55 PM, Yu-Shan Fung wrote: >> I think you want @user.uid instead of @user.id >> >> On Thu, Oct 23, 2008 at 1:16 PM, Cristobal Viedma >> wrote: >>> >>> Hi, >>> >>> I'm just new in facebooker but I am having a problem and I cannot find >>> it answered before, so here I go. >>> I tried to get the photos of a user and all the time I am getting this >>> error: >>> >>> Facebooker::Session::MissingOrInvalidParameter in HolaController#index >>> Invalid parameter >>> vendor/plugins/facebooker/lib/facebooker/parser.rb:468:in `process' >>> vendor/plugins/facebooker/lib/facebooker/parser.rb:15:in `parse' >>> vendor/plugins/facebooker/lib/facebooker/service.rb:14:in `post' >>> vendor/plugins/facebooker/lib/facebooker/session.rb:478:in >>> `post_without_logging' >>> vendor/plugins/facebooker/lib/facebooker/session.rb:489:in `post' >>> .... >>> >>> What I am doing actually is just the following two lines in my controller: >>> >>> @user = facebook_session.user >>> @photos = facebook_session.get_photos(:subj_id => @user.id) >>> >>> The one that is failing is the second one. I have also tried giving >>> directly the id of the user: >>> @photos = facebook_session.get_photos(:subj_id => anIDint) >>> >>> and still the same.. >>> >>> In my application controller I have the following: >>> ensure_application_is_installed_by_facebook_user >>> >>> I know it must be something very stupid what I am doing... but I can't >>> tell! >>> >>> does anyone know what's my error? >>> >>> Thanks, >>> >>> Cristobal Viedma >>> _______________________________________________ >>> Facebooker-talk mailing list >>> Facebooker-talk at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/facebooker-talk >> >> >> >> -- >> "Reality is that which, when you stop believing in it, doesn't go away." >> - Philip K. Dick, American Writer >> > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > From jonathan.otto at gmail.com Fri Oct 24 14:58:08 2008 From: jonathan.otto at gmail.com (Jonathan Otto) Date: Fri, 24 Oct 2008 13:58:08 -0500 Subject: [Facebooker-talk] why does ensure_authenticated_to_facebook request app install? In-Reply-To: <9faa4c0d0810231556mbd42ecq547df1ba808dbdc0@mail.gmail.com> References: <9faa4c0d0810231556mbd42ecq547df1ba808dbdc0@mail.gmail.com> Message-ID: Nope, you just need to check for: params[:fb_sig] && params[:fb_sig_added].to_i == 0 If the user clicked a link from Facebook to get to your app, there will also be a "fromhash" parameter present too, which means you'll have access to the users' Facebook ID through params[:fb_sig_canvas_user] You'll find that params[:fb_sig_canvas_user] isn't as useful as you'd like since as I mentioned, it only comes up if you click a link from inside Facebook. Unfortunately, clicking a bookmark does not seem to work. The conclusion being that most of the time you won't be able to access a user's Facebook ID unless they actually install the application. On Thu, Oct 23, 2008 at 5:56 PM, Sam Clearman wrote: > When I get redirected by ensure_authenticated_to_facebook it asks me > to install the application.. is this by design? I just want to make > sure the user is actually logged in to facebook. > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > From cviedmai at gmail.com Fri Oct 24 21:16:37 2008 From: cviedmai at gmail.com (Cristobal Viedma) Date: Sat, 25 Oct 2008 03:16:37 +0200 Subject: [Facebooker-talk] Facebooker::Session::MissingOrInvalidParameter In-Reply-To: References: <5a002f4a0810231355p5d7fc071x2ab360129a6bd871@mail.gmail.com> Message-ID: oh yes, it works! I was just following the Rails of facebook peepcode book and they had it wrong there... maybe the version change, dunno... thank you very much! On Fri, Oct 24, 2008 at 8:52 PM, Jonathan Otto wrote: > Here is the method signature of get_photos() > > def get_photos(pids = nil, subj_id = nil, aid = nil) > > It does not appear to take a hash as a list of arguments. Since you > indicate that you want to use the subject_id (which finds photos > tagged with that user) try passing nil for the first parameter. > > @photos = facebook_session.get_photos(nil, @user.uid) > > On Thu, Oct 23, 2008 at 4:02 PM, Cristobal Viedma wrote: >> oh, I wrote it wrong, but I get the same problem, and also as I said I >> tried putting directly my uid (both in integer or string) and same >> error. >> >> Here you can find the full trace: >> >> Facebooker::Session::MissingOrInvalidParameter in HolaController#index >> >> Invalid parameter >> >> RAILS_ROOT: /home/chris/workspace-Aptana/cool-hunters >> Application Trace | Framework Trace | Full Trace >> >> vendor/plugins/facebooker/lib/facebooker/parser.rb:468:in `process' >> vendor/plugins/facebooker/lib/facebooker/parser.rb:15:in `parse' >> vendor/plugins/facebooker/lib/facebooker/service.rb:14:in `post' >> vendor/plugins/facebooker/lib/facebooker/session.rb:478:in >> `post_without_logging' >> vendor/plugins/facebooker/lib/facebooker/session.rb:489:in `post' >> vendor/plugins/facebooker/lib/facebooker/logging.rb:16:in `log_fb_api' >> /usr/lib/ruby/1.8/benchmark.rb:293:in `measure' >> /usr/lib/ruby/1.8/benchmark.rb:307:in `realtime' >> vendor/plugins/facebooker/lib/facebooker/logging.rb:16:in `log_fb_api' >> vendor/plugins/facebooker/lib/facebooker/session.rb:488:in `post' >> vendor/plugins/facebooker/lib/facebooker/session.rb:272:in `get_photos' >> app/controllers/hola_controller.rb:5:in `index' >> /var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:1158:in >> `send' >> /var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:1158:in >> `perform_action_without_filters' >> /var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/filters.rb:697:in >> `call_filters' >> /var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/filters.rb:689:in >> `perform_action_without_benchmark' >> /var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/benchmarking.rb:68:in >> `perform_action_without_rescue' >> /var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/benchmarking.rb:68:in >> `perform_action_without_rescue' >> /var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/rescue.rb:199:in >> `perform_action_without_caching' >> /var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/caching.rb:678:in >> `perform_action' >> /var/lib/gems/1.8/gems/activerecord-2.0.2-/lib/active_record/connection_adapters/abstract/query_cache.rb:33:in >> `cache' >> /var/lib/gems/1.8/gems/activerecord-2.0.2-/lib/active_record/query_cache.rb:8:in >> `cache' >> /var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/caching.rb:677:in >> `perform_action' >> /var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:524:in >> `send' >> /var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:524:in >> `process_without_filters' >> /var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/filters.rb:685:in >> `process_without_session_management_support' >> /var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/session_management.rb:123:in >> `process' >> /var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:388:in >> `process' >> /var/lib/gems/1.8/gems/rails-2.0.2-/lib/webrick_server.rb:78:in `service' >> /var/lib/gems/1.8/gems/rails-2.0.2-/lib/commands/servers/webrick.rb:66 >> /var/lib/gems/1.8/gems/activesupport-2.0.2-/lib/active_support/dependencies.rb:496:in >> `require' >> /var/lib/gems/1.8/gems/activesupport-2.0.2-/lib/active_support/dependencies.rb:342:in >> `new_constants_in' >> /var/lib/gems/1.8/gems/activesupport-2.0.2-/lib/active_support/dependencies.rb:496:in >> `require' >> /var/lib/gems/1.8/gems/rails-2.0.2-/lib/commands/server.rb:39 >> -e:2:in `load' >> -e:2 >> >> >> >> On Thu, Oct 23, 2008 at 10:55 PM, Yu-Shan Fung wrote: >>> I think you want @user.uid instead of @user.id >>> >>> On Thu, Oct 23, 2008 at 1:16 PM, Cristobal Viedma >>> wrote: >>>> >>>> Hi, >>>> >>>> I'm just new in facebooker but I am having a problem and I cannot find >>>> it answered before, so here I go. >>>> I tried to get the photos of a user and all the time I am getting this >>>> error: >>>> >>>> Facebooker::Session::MissingOrInvalidParameter in HolaController#index >>>> Invalid parameter >>>> vendor/plugins/facebooker/lib/facebooker/parser.rb:468:in `process' >>>> vendor/plugins/facebooker/lib/facebooker/parser.rb:15:in `parse' >>>> vendor/plugins/facebooker/lib/facebooker/service.rb:14:in `post' >>>> vendor/plugins/facebooker/lib/facebooker/session.rb:478:in >>>> `post_without_logging' >>>> vendor/plugins/facebooker/lib/facebooker/session.rb:489:in `post' >>>> .... >>>> >>>> What I am doing actually is just the following two lines in my controller: >>>> >>>> @user = facebook_session.user >>>> @photos = facebook_session.get_photos(:subj_id => @user.id) >>>> >>>> The one that is failing is the second one. I have also tried giving >>>> directly the id of the user: >>>> @photos = facebook_session.get_photos(:subj_id => anIDint) >>>> >>>> and still the same.. >>>> >>>> In my application controller I have the following: >>>> ensure_application_is_installed_by_facebook_user >>>> >>>> I know it must be something very stupid what I am doing... but I can't >>>> tell! >>>> >>>> does anyone know what's my error? >>>> >>>> Thanks, >>>> >>>> Cristobal Viedma >>>> _______________________________________________ >>>> Facebooker-talk mailing list >>>> Facebooker-talk at rubyforge.org >>>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>> >>> >>> >>> -- >>> "Reality is that which, when you stop believing in it, doesn't go away." >>> - Philip K. Dick, American Writer >>> >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/facebooker-talk >> > From sam.clearman at gmail.com Mon Oct 27 15:31:47 2008 From: sam.clearman at gmail.com (Sam Clearman) Date: Mon, 27 Oct 2008 15:31:47 -0400 Subject: [Facebooker-talk] Creating infinite sessions Message-ID: <9faa4c0d0810271231p2fb00957ydb60fcfc219134f7@mail.gmail.com> I want to use infinite sessions in my application. Right now I have the following in my controller: protected def update_session_key secure_with_facebook_params! if facebook_session.infinite? # Store the session key in the DB end end and I ask for the permission with the fbml tags. I then call update_session_key on every request, in case they decided to give me permission. Is there a better way of going about this? I am particularly concerned by the use of secure_with_facebook_params! which seems kind of hacky. From zhao.lu.us at gmail.com Mon Oct 27 17:16:32 2008 From: zhao.lu.us at gmail.com (Zhao Lu) Date: Mon, 27 Oct 2008 14:16:32 -0700 Subject: [Facebooker-talk] loading wrong type of content in firefox Message-ID: I'm stuck on this weird problem and hoping maybe someone has solved this before. My applications has a facebook client and a regular web client. The application renders fbml.erb or html.erb pages depending on the type of request. Things have been working correctly until I introduced application.fbml.erb. Prior to the introduction to this file, the server response to different types correctly. Now when receiving a text/html (request.format), the server response with application.fbml.erb page. To make things more confusing, this only happens in firefox (3.0.3 under os x), but not on safari. Any suggestion is appreciated. -- Zhao From digidigo at gmail.com Mon Oct 27 17:44:42 2008 From: digidigo at gmail.com (David Clements) Date: Mon, 27 Oct 2008 15:44:42 -0600 Subject: [Facebooker-talk] Fwd: facebooker, respond_to and firefox 3 beta5/pre In-Reply-To: <10166006-6666-44B7-B21C-B7FF6CD1999F@alonetone.com> References: <1D4BD8C7-CF44-40D2-B98C-91B3A843040F@alonetone.com> <6A25ED4B-8394-4436-8ED3-D0D60B36A0FA@alonetone.com> <10166006-6666-44B7-B21C-B7FF6CD1999F@alonetone.com> Message-ID: Here was a thread on this a few months ago. Dave ---------- Forwarded message ---------- From: sudara Date: Fri, May 16, 2008 at 1:59 PM Subject: Re: [Facebooker-talk] facebooker, respond_to and firefox 3 beta5/pre To: facebooker-talk at rubyforge.org Wow, so I'm trippen out. The answer: removed: Mime::Type.register 'text/html', :fbml added: Mime::Type.register_alias 'text/html', :fbml Every request works as it now should. I've been poking around in vendor/rails/actionpack/lib/action_controller/mime_type.rb to try and determine what the heck would make Firefox behave so uniquely. Then again, I should have register_alias'd to begin with, no? Funny thing is, it was working like a breeze until Firefox 3. Must have *something* to do with the accept headers it sends? anywho, I couldn't find much Documentation about registering the fbml alias, but maybe we can throw a gotcha note in there. Sudara On May 16, 2008, at 8:12 PM, David Clements wrote: I confirmed this for you. Firefox 3 returns FBML and Firefox 2 does not. > > Dave > > On Fri, May 16, 2008 at 10:03 AM, sudara wrote: > Hey there. > > I prematurely posted. I'm still having this issue, but I unfairly left out > the small detail that I'm on Rails 2.1 RC1. > > I do not have caching enabled, and the logs look absolutely "correct" - > That is, there is no difference in incoming params between a request coming > from Safari and a request coming from Firefox. What is different is that > Firefox triggers the fbml respond_to block. > > I'm going to investigate a bit more, just thought I would send the message > out in the case that someone else has seen this. > > And actually, this is on a live site - http://alonetone.com/sudara is an > example of a page that triggers the fbml layout in Firefox3 > > Sudara > > > On May 15, 2008, at 5:45 PM, David Clements wrote: > > Hey Sudara, >> >> I currently have this implemented for one of my apps and I don't see this >> problem in Firefox 3. >> >> Can you post some code? And the pieces of the log? >> >> You don't have caching turned on do you? >> >> Dave >> >> On Thu, May 15, 2008 at 7:48 AM, sudara wrote: >> Hi there, >> >> I have a controller that responds to fbml and html, with html at the top. >> >> In all browsers, this works as expected - When I'm hitting the controller >> from my normal app, I get html. When I hit it inside facebook, I get fbml. >> >> However, with Firefox 3 hitting the normal app, I'm getting fbml for some >> odd reason. >> >> Am I crazy? >> >> Sudara >> _______________________________________________ >> 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From zhao.lu.us at gmail.com Mon Oct 27 19:54:46 2008 From: zhao.lu.us at gmail.com (Zhao Lu) Date: Mon, 27 Oct 2008 16:54:46 -0700 Subject: [Facebooker-talk] link_to_remote with :method => :get inside of facebook Message-ID: I'm using link_to_remote with method set to get to invoke the index method in my controller: <%= link_to_remote(gc.category, :url => gifts_url({:canvas => false, :action => "index", :type => 'ImageGift', :category => gc.category, :format => 'fbml'}), :method => :get, :success => 'update_images(request)') %> When requesting from facebook, the :method => :get is not respected and the controller tries to process :POST and invokes create method. I took a look at the http headers, which has "REQUEST_METHOD"=>"POST". I'm not sure if doing a get request is entirely not possible from inside of fb or if I'm missing something. Any suggestion is appreciated. -- Zhao From dennymontoya at gmail.com Mon Oct 27 19:01:49 2008 From: dennymontoya at gmail.com (Denny Montoya) Date: Mon, 27 Oct 2008 15:01:49 -0800 Subject: [Facebooker-talk] Bebo Setup Message-ID: Hello, Just wanted to know if there was a specific way I needed to setup my app for integration with bebo. Do I need a bebo.yml file, or is there a way to declare this in facebooker.yml. What about routes? My understanding is that facebooker is now providing support for bebo but I havent found anything that talks about getting this working. Any tips would be greatly appreciated. Best, Denny -------------- next part -------------- An HTML attachment was scrubbed... URL: From lee at crossbonesystems.com Tue Oct 28 03:44:39 2008 From: lee at crossbonesystems.com (Lee Mallabone) Date: Tue, 28 Oct 2008 07:44:39 +0000 Subject: [Facebooker-talk] loading wrong type of content in firefox In-Reply-To: References: Message-ID: 2008/10/27 Zhao Lu : > I'm stuck on this weird problem and hoping maybe someone has solved this before. > > Things have been working correctly > until I introduced application.fbml.erb. > > Prior to the introduction to this file, the server response to > different types correctly. Now when receiving a text/html > (request.format), > the server response with application.fbml.erb page. Hi Zhao, I'm not sure why this happens, but I remember having similar issues and they seemed to go away when I explicitly specified the layout in my application.rb with this line: layout 'application' Let me know if you find the root cause though; my understanding is that the explicit reference should really be redundant. Lee. -- Lee Mallabone. Director, Crossbone Systems Ltd. http://www.crossbonesystems.com/ http://www.fonicmonkey.net/ http://CambridgeWebHeads.ning.com/ From zhao.lu.us at gmail.com Tue Oct 28 00:37:44 2008 From: zhao.lu.us at gmail.com (Zhao Lu) Date: Mon, 27 Oct 2008 21:37:44 -0700 Subject: [Facebooker-talk] Fwd: facebooker, respond_to and firefox 3 beta5/pre In-Reply-To: References: <1D4BD8C7-CF44-40D2-B98C-91B3A843040F@alonetone.com> <6A25ED4B-8394-4436-8ED3-D0D60B36A0FA@alonetone.com> <10166006-6666-44B7-B21C-B7FF6CD1999F@alonetone.com> Message-ID: That was it, thanks a bunch. I'm actually using FF3.0.3. On Mon, Oct 27, 2008 at 2:44 PM, David Clements wrote: > Here was a thread on this a few months ago. > > Dave > > ---------- Forwarded message ---------- > From: sudara > Date: Fri, May 16, 2008 at 1:59 PM > Subject: Re: [Facebooker-talk] facebooker, respond_to and firefox 3 > beta5/pre > To: facebooker-talk at rubyforge.org > > > Wow, so I'm trippen out. > > The answer: > > removed: > Mime::Type.register 'text/html', :fbml > > added: > Mime::Type.register_alias 'text/html', :fbml > > Every request works as it now should. > > I've been poking around in > vendor/rails/actionpack/lib/action_controller/mime_type.rb to try and > determine what the heck would make Firefox behave so uniquely. > > Then again, I should have register_alias'd to begin with, no? > > Funny thing is, it was working like a breeze until Firefox 3. Must have > *something* to do with the accept headers it sends? > > anywho, I couldn't find much Documentation about registering the fbml alias, > but maybe we can throw a gotcha note in there. > > Sudara > > On May 16, 2008, at 8:12 PM, David Clements wrote: > >> I confirmed this for you. Firefox 3 returns FBML and Firefox 2 does not. >> >> Dave >> >> On Fri, May 16, 2008 at 10:03 AM, sudara wrote: >> Hey there. >> >> I prematurely posted. I'm still having this issue, but I unfairly left out >> the small detail that I'm on Rails 2.1 RC1. >> >> I do not have caching enabled, and the logs look absolutely "correct" - >> That is, there is no difference in incoming params between a request coming >> from Safari and a request coming from Firefox. What is different is that >> Firefox triggers the fbml respond_to block. >> >> I'm going to investigate a bit more, just thought I would send the message >> out in the case that someone else has seen this. >> >> And actually, this is on a live site - http://alonetone.com/sudara is an >> example of a page that triggers the fbml layout in Firefox3 >> >> Sudara >> >> >> On May 15, 2008, at 5:45 PM, David Clements wrote: >> >>> Hey Sudara, >>> >>> I currently have this implemented for one of my apps and I don't see this >>> problem in Firefox 3. >>> >>> Can you post some code? And the pieces of the log? >>> >>> You don't have caching turned on do you? >>> >>> Dave >>> >>> On Thu, May 15, 2008 at 7:48 AM, sudara wrote: >>> Hi there, >>> >>> I have a controller that responds to fbml and html, with html at the top. >>> >>> In all browsers, this works as expected - When I'm hitting the controller >>> from my normal app, I get html. When I hit it inside facebook, I get fbml. >>> >>> However, with Firefox 3 hitting the normal app, I'm getting fbml for some >>> odd reason. >>> >>> Am I crazy? >>> >>> Sudara >>> _______________________________________________ >>> 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 > > > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > > -- Zhao From zhao.lu.us at gmail.com Wed Oct 29 13:22:41 2008 From: zhao.lu.us at gmail.com (Zhao Lu) Date: Wed, 29 Oct 2008 10:22:41 -0700 Subject: [Facebooker-talk] link_to_remote with :method => :get inside of facebook In-Reply-To: References: Message-ID: That was it, Thanks Jonathan! On Wed, Oct 29, 2008 at 9:13 AM, Jonathan Otto wrote: > use :_method => :get instead > > note the underscore > > On Mon, Oct 27, 2008 at 6:54 PM, Zhao Lu wrote: >> I'm using link_to_remote with method set to get to invoke the index >> method in my controller: >> <%= link_to_remote(gc.category, >> :url => gifts_url({:canvas => false, :action => "index", >> :type => 'ImageGift', :category => gc.category, :format => 'fbml'}), >> :method => :get, :success => 'update_images(request)') %> >> >> When requesting from facebook, the :method => :get is not respected >> and the controller tries to process :POST and invokes create method. >> I took a look at the http headers, which has "REQUEST_METHOD"=>"POST". >> >> I'm not sure if doing a get request is entirely not possible from >> inside of fb or if I'm missing something. >> >> Any suggestion is appreciated. >> >> -- >> Zhao >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/facebooker-talk >> > -- Zhao From digidigo at gmail.com Tue Oct 28 13:51:19 2008 From: digidigo at gmail.com (David Clements) Date: Tue, 28 Oct 2008 11:51:19 -0600 Subject: [Facebooker-talk] Bebo Setup In-Reply-To: References: Message-ID: You can put something like this in your facebooker.yml file bebo_api_key: pZwnITIadEri1V0fNPxEMhSen9VBCoRf5jV9 bebo_secret_key: SECRET bebo_canvas_page_name: ttdev bebo_adapter: BeboAdapter Dave On Mon, Oct 27, 2008 at 5:01 PM, Denny Montoya wrote: > Hello, > > Just wanted to know if there was a specific way I needed to setup my app > for integration with bebo. Do I need a bebo.yml file, or is there a way to > declare this in facebooker.yml. What about routes? My understanding is > that facebooker is now providing support for bebo but I havent found > anything that talks about getting this working. Any tips would be greatly > appreciated. > > Best, > > Denny > > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jonathan.otto at gmail.com Wed Oct 29 12:22:53 2008 From: jonathan.otto at gmail.com (Jonathan Otto) Date: Wed, 29 Oct 2008 11:22:53 -0500 Subject: [Facebooker-talk] Bebo Setup In-Reply-To: References: Message-ID: Checkout adapter_base.rb Then see the following static method: def self.load_adapter(params) Then investigate the method to see what kinds of keys you can pass into that params method. I see two: config_key_base, and fb_sig_api_key. To call a static method, simply type the class name, dot, then the static method. Static methods do not require objects. An example of calling this method is as follows: Facebooker.load_adapter(:config_key_base => "bebo") You might try calling this within a method that gets called from a before_filter in application controller. In that method you can check for bebo specific parameters, and if they exist, then call that load_adapter method. Add bebo_api_key and another necessary parameters prefixed with bebo_ in the facebooker.yml On Mon, Oct 27, 2008 at 6:01 PM, Denny Montoya wrote: > Hello, > > Just wanted to know if there was a specific way I needed to setup my app for > integration with bebo. Do I need a bebo.yml file, or is there a way to > declare this in facebooker.yml. What about routes? My understanding is > that facebooker is now providing support for bebo but I havent found > anything that talks about getting this working. Any tips would be greatly > appreciated. > > Best, > > Denny > > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > > From zhao.lu.us at gmail.com Wed Oct 29 02:01:13 2008 From: zhao.lu.us at gmail.com (Zhao Lu) Date: Tue, 28 Oct 2008 23:01:13 -0700 Subject: [Facebooker-talk] ajax + facebooker Message-ID: I'm trying to get something similar to example2 in the following link working: http://jnylund.typepad.com/joels_blog/2008/02/ajax-rails-face.html I have defined a function in my AccountsController: def load_accounts_for_contact render :text => "some text here", :layout => false end I have defined the routes for it: map.resources :contacts, :path_prefix => "/users/:user_id", :name_prefix => "user_" do |contact| contact.resources :accounts, :collection => { :load_accounts_for_contact => :get } end In my view I have: >From firebug I can see that the url built is correct and if I copy it directly into the browser, I can get the rendered text (some text here). But the ajax call causes an exception as if the routes couldn't be found: Processing ApplicationController#index (for 127.0.0.1 at 2008-10-28 22:48:15) [POST] Session ID: 1b06418b3bbb49125147af6a-617977441 Parameters: {"fb_sig_time"=>"1225259294.7547", "fb_sig"=>"62540514b667f921ca9b2ba59d33ceb6", "fb_sig_in_new_facebook"=>"1", "fb_sig_locale"=>"en_US", "fb_sig_session_key"=>"1b06418b3bbb49125147af6a-617977441", "fb_sig_expires"=>"1225345694", "fb_sig_added"=>"1", "fb_sig_is_ajax"=>"1", "fb_sig_api_key"=>"xxxxxx", "fb_sig_user"=>"xxxxx", "fb_sig_profile_update_time"=>"1218210790"} ActionController::MethodNotAllowed (Only get, put, and delete requests are allowed.): /Users/zlu/.gem/ruby/1.8/gems/actionpack-2.1.1/lib/action_controller/routing/recognition_optimisation.rb:65:in `recognize_path' /Users/zlu/.gem/ruby/1.8/gems/actionpack-2.1.1/lib/action_controller/routing/route_set.rb:384:in `recognize' /Users/zlu/.gem/ruby/1.8/gems/actionpack-2.1.1/lib/action_controller/dispatcher.rb:148:in `handle_request' /Users/zlu/.gem/ruby/1.8/gems/actionpack-2.1.1/lib/action_controller/dispatcher.rb:107:in `dispatch' /Users/zlu/.gem/ruby/1.8/gems/actionpack-2.1.1/lib/action_controller/dispatcher.rb:104:in `synchronize' /Users/zlu/.gem/ruby/1.8/gems/actionpack-2.1.1/lib/action_controller/dispatcher.rb:104:in `dispatch' /Users/zlu/.gem/ruby/1.8/gems/actionpack-2.1.1/lib/action_controller/dispatcher.rb:120:in `dispatch_cgi' /Users/zlu/.gem/ruby/1.8/gems/actionpack-2.1.1/l I'm not sure what is wrong here, so any insight will be greatly appreciated. -- Zhao From jonathan.otto at gmail.com Wed Oct 29 12:13:01 2008 From: jonathan.otto at gmail.com (Jonathan Otto) Date: Wed, 29 Oct 2008 11:13:01 -0500 Subject: [Facebooker-talk] link_to_remote with :method => :get inside of facebook In-Reply-To: References: Message-ID: use :_method => :get instead note the underscore On Mon, Oct 27, 2008 at 6:54 PM, Zhao Lu wrote: > I'm using link_to_remote with method set to get to invoke the index > method in my controller: > <%= link_to_remote(gc.category, > :url => gifts_url({:canvas => false, :action => "index", > :type => 'ImageGift', :category => gc.category, :format => 'fbml'}), > :method => :get, :success => 'update_images(request)') %> > > When requesting from facebook, the :method => :get is not respected > and the controller tries to process :POST and invokes create method. > I took a look at the http headers, which has "REQUEST_METHOD"=>"POST". > > I'm not sure if doing a get request is entirely not possible from > inside of fb or if I'm missing something. > > Any suggestion is appreciated. > > -- > Zhao > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > From tres.wong-godfrey at saniq.com Wed Oct 29 20:29:59 2008 From: tres.wong-godfrey at saniq.com (Tres Wong-Godfrey) Date: Wed, 29 Oct 2008 17:29:59 -0700 Subject: [Facebooker-talk] ajax + facebooker In-Reply-To: References: Message-ID: Have you tried restarting mongrel on your server after adding the new routes? On Oct 28, 2008, at 11:01 PM, Zhao Lu wrote: > I'm trying to get something similar to example2 in the following > link working: > http://jnylund.typepad.com/joels_blog/2008/02/ajax-rails-face.html > > I have defined a function in my AccountsController: > > def load_accounts_for_contact > render :text => "some text here", :layout => false > end > > I have defined the routes for it: > map.resources :contacts, :path_prefix => "/users/:user_id", > :name_prefix => "user_" do |contact| > contact.resources :accounts, :collection => { > :load_accounts_for_contact => :get } > end > > In my view I have: > > > >> From firebug I can see that the url built is correct and if I copy it > directly into the browser, I can get the rendered text (some text > here). > But the ajax call causes an exception as if the routes couldn't be > found: > > Processing ApplicationController#index (for 127.0.0.1 at 2008-10-28 > 22:48:15) [POST] > Session ID: 1b06418b3bbb49125147af6a-617977441 > Parameters: {"fb_sig_time"=>"1225259294.7547", > "fb_sig"=>"62540514b667f921ca9b2ba59d33ceb6", > "fb_sig_in_new_facebook"=>"1", "fb_sig_locale"=>"en_US", > "fb_sig_session_key"=>"1b06418b3bbb49125147af6a-617977441", > "fb_sig_expires"=>"1225345694", "fb_sig_added"=>"1", > "fb_sig_is_ajax"=>"1", "fb_sig_api_key"=>"xxxxxx", > "fb_sig_user"=>"xxxxx", "fb_sig_profile_update_time"=>"1218210790"} > > > ActionController::MethodNotAllowed (Only get, put, and delete requests > are allowed.): > /Users/zlu/.gem/ruby/1.8/gems/actionpack-2.1.1/lib/ > action_controller/routing/recognition_optimisation.rb:65:in > `recognize_path' > /Users/zlu/.gem/ruby/1.8/gems/actionpack-2.1.1/lib/ > action_controller/routing/route_set.rb:384:in > `recognize' > /Users/zlu/.gem/ruby/1.8/gems/actionpack-2.1.1/lib/ > action_controller/dispatcher.rb:148:in > `handle_request' > /Users/zlu/.gem/ruby/1.8/gems/actionpack-2.1.1/lib/ > action_controller/dispatcher.rb:107:in > `dispatch' > /Users/zlu/.gem/ruby/1.8/gems/actionpack-2.1.1/lib/ > action_controller/dispatcher.rb:104:in > `synchronize' > /Users/zlu/.gem/ruby/1.8/gems/actionpack-2.1.1/lib/ > action_controller/dispatcher.rb:104:in > `dispatch' > /Users/zlu/.gem/ruby/1.8/gems/actionpack-2.1.1/lib/ > action_controller/dispatcher.rb:120:in > `dispatch_cgi' > /Users/zlu/.gem/ruby/1.8/gems/actionpack-2.1.1/l > > I'm not sure what is wrong here, so any insight will be greatly > appreciated. > > -- > Zhao > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk From chrisnolan.ca+rubyforge at gmail.com Wed Oct 29 20:43:59 2008 From: chrisnolan.ca+rubyforge at gmail.com (Chris Nolan.ca) Date: Wed, 29 Oct 2008 20:43:59 -0400 Subject: [Facebooker-talk] ajax + facebooker In-Reply-To: References: Message-ID: <4f6b19c0810291743q62f9193fn1ab79c8f7a6f790b@mail.gmail.com> Since you're not using the Ajax.Updater from facebooker.js you need to tell it the _method since by default everything facebook sends you is a POST (or change your route to allow the post). Instead of ajax.post(url); do params = {'_method':'GET'} ajax.post(url, params); Take a look @ the facebooker.js to see which routines from prototype/scriptaculous have been overriden to work in facebook. Eliminating layers between fan and creator, publisher and retailer http://PullBot.com/ http://Kekova.ca/ http://ChrisNolan.ca/ On Wed, Oct 29, 2008 at 02:01, Zhao Lu wrote: > I'm trying to get something similar to example2 in the following link > working: > http://jnylund.typepad.com/joels_blog/2008/02/ajax-rails-face.html > > I have defined a function in my AccountsController: > > def load_accounts_for_contact > render :text => "some text here", :layout => false > end > > I have defined the routes for it: > map.resources :contacts, :path_prefix => "/users/:user_id", > :name_prefix => "user_" do |contact| > contact.resources :accounts, :collection => { > :load_accounts_for_contact => :get } > end > > In my view I have: > > > > >From firebug I can see that the url built is correct and if I copy it > directly into the browser, I can get the rendered text (some text > here). > But the ajax call causes an exception as if the routes couldn't be found: > > Processing ApplicationController#index (for 127.0.0.1 at 2008-10-28 > 22:48:15) [POST] > Session ID: 1b06418b3bbb49125147af6a-617977441 > Parameters: {"fb_sig_time"=>"1225259294.7547", > "fb_sig"=>"62540514b667f921ca9b2ba59d33ceb6", > "fb_sig_in_new_facebook"=>"1", "fb_sig_locale"=>"en_US", > "fb_sig_session_key"=>"1b06418b3bbb49125147af6a-617977441", > "fb_sig_expires"=>"1225345694", "fb_sig_added"=>"1", > "fb_sig_is_ajax"=>"1", "fb_sig_api_key"=>"xxxxxx", > "fb_sig_user"=>"xxxxx", "fb_sig_profile_update_time"=>"1218210790"} > > > ActionController::MethodNotAllowed (Only get, put, and delete requests > are allowed.): > > /Users/zlu/.gem/ruby/1.8/gems/actionpack-2.1.1/lib/action_controller/routing/recognition_optimisation.rb:65:in > `recognize_path' > > /Users/zlu/.gem/ruby/1.8/gems/actionpack-2.1.1/lib/action_controller/routing/route_set.rb:384:in > `recognize' > > /Users/zlu/.gem/ruby/1.8/gems/actionpack-2.1.1/lib/action_controller/dispatcher.rb:148:in > `handle_request' > > /Users/zlu/.gem/ruby/1.8/gems/actionpack-2.1.1/lib/action_controller/dispatcher.rb:107:in > `dispatch' > > /Users/zlu/.gem/ruby/1.8/gems/actionpack-2.1.1/lib/action_controller/dispatcher.rb:104:in > `synchronize' > > /Users/zlu/.gem/ruby/1.8/gems/actionpack-2.1.1/lib/action_controller/dispatcher.rb:104:in > `dispatch' > > /Users/zlu/.gem/ruby/1.8/gems/actionpack-2.1.1/lib/action_controller/dispatcher.rb:120:in > `dispatch_cgi' > /Users/zlu/.gem/ruby/1.8/gems/actionpack-2.1.1/l > > I'm not sure what is wrong here, so any insight will be greatly > appreciated. > > -- > Zhao > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tres.wong-godfrey at saniq.com Wed Oct 29 21:39:56 2008 From: tres.wong-godfrey at saniq.com (Tres Wong-Godfrey) Date: Wed, 29 Oct 2008 18:39:56 -0700 Subject: [Facebooker-talk] ajax + facebooker In-Reply-To: References: Message-ID: <8B52A602-E547-4A18-BB99-03F09F413047@saniq.com> My apologies. Not careful enough about reading the fact that things were rendering & it appears that my mail queue is running about 20 hours behind due to a massive spam flood. On Oct 28, 2008, at 11:01 PM, Zhao Lu wrote: > I'm trying to get something similar to example2 in the following > link working: > http://jnylund.typepad.com/joels_blog/2008/02/ajax-rails-face.html > > I have defined a function in my AccountsController: > > def load_accounts_for_contact > render :text => "some text here", :layout => false > end > > I have defined the routes for it: > map.resources :contacts, :path_prefix => "/users/:user_id", > :name_prefix => "user_" do |contact| > contact.resources :accounts, :collection => { > :load_accounts_for_contact => :get } > end > > In my view I have: > > > >> From firebug I can see that the url built is correct and if I copy it > directly into the browser, I can get the rendered text (some text > here). > But the ajax call causes an exception as if the routes couldn't be > found: > > Processing ApplicationController#index (for 127.0.0.1 at 2008-10-28 > 22:48:15) [POST] > Session ID: 1b06418b3bbb49125147af6a-617977441 > Parameters: {"fb_sig_time"=>"1225259294.7547", > "fb_sig"=>"62540514b667f921ca9b2ba59d33ceb6", > "fb_sig_in_new_facebook"=>"1", "fb_sig_locale"=>"en_US", > "fb_sig_session_key"=>"1b06418b3bbb49125147af6a-617977441", > "fb_sig_expires"=>"1225345694", "fb_sig_added"=>"1", > "fb_sig_is_ajax"=>"1", "fb_sig_api_key"=>"xxxxxx", > "fb_sig_user"=>"xxxxx", "fb_sig_profile_update_time"=>"1218210790"} > > > ActionController::MethodNotAllowed (Only get, put, and delete requests > are allowed.): > /Users/zlu/.gem/ruby/1.8/gems/actionpack-2.1.1/lib/ > action_controller/routing/recognition_optimisation.rb:65:in > `recognize_path' > /Users/zlu/.gem/ruby/1.8/gems/actionpack-2.1.1/lib/ > action_controller/routing/route_set.rb:384:in > `recognize' > /Users/zlu/.gem/ruby/1.8/gems/actionpack-2.1.1/lib/ > action_controller/dispatcher.rb:148:in > `handle_request' > /Users/zlu/.gem/ruby/1.8/gems/actionpack-2.1.1/lib/ > action_controller/dispatcher.rb:107:in > `dispatch' > /Users/zlu/.gem/ruby/1.8/gems/actionpack-2.1.1/lib/ > action_controller/dispatcher.rb:104:in > `synchronize' > /Users/zlu/.gem/ruby/1.8/gems/actionpack-2.1.1/lib/ > action_controller/dispatcher.rb:104:in > `dispatch' > /Users/zlu/.gem/ruby/1.8/gems/actionpack-2.1.1/lib/ > action_controller/dispatcher.rb:120:in > `dispatch_cgi' > /Users/zlu/.gem/ruby/1.8/gems/actionpack-2.1.1/l > > I'm not sure what is wrong here, so any insight will be greatly > appreciated. > > -- > Zhao > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk From zhao.lu.us at gmail.com Wed Oct 29 21:47:05 2008 From: zhao.lu.us at gmail.com (Zhao Lu) Date: Wed, 29 Oct 2008 18:47:05 -0700 Subject: [Facebooker-talk] ajax + facebooker In-Reply-To: <4f6b19c0810291743q62f9193fn1ab79c8f7a6f790b@mail.gmail.com> References: <4f6b19c0810291743q62f9193fn1ab79c8f7a6f790b@mail.gmail.com> Message-ID: Yep, my other posting about link_to_remote had the same problem with not defining _method (I defined method without the underscore). I should have looked at facebooker.js to begin with but it didn't cross my mind. Thanks Chris! Zhao On Wed, Oct 29, 2008 at 5:43 PM, Chris Nolan.ca wrote: > Since you're not using the Ajax.Updater from facebooker.js you need to tell > it the _method since by default everything facebook sends you is a POST (or > change your route to allow the post). > > Instead of > > ajax.post(url); > > do > > params = {'_method':'GET'} > ajax.post(url, params); > > Take a look @ the facebooker.js to see which routines from > prototype/scriptaculous have been overriden to work in facebook. > > Eliminating layers between fan and creator, publisher and retailer > http://PullBot.com/ > http://Kekova.ca/ > http://ChrisNolan.ca/ > > > On Wed, Oct 29, 2008 at 02:01, Zhao Lu wrote: >> >> I'm trying to get something similar to example2 in the following link >> working: >> http://jnylund.typepad.com/joels_blog/2008/02/ajax-rails-face.html >> >> I have defined a function in my AccountsController: >> >> def load_accounts_for_contact >> render :text => "some text here", :layout => false >> end >> >> I have defined the routes for it: >> map.resources :contacts, :path_prefix => "/users/:user_id", >> :name_prefix => "user_" do |contact| >> contact.resources :accounts, :collection => { >> :load_accounts_for_contact => :get } >> end >> >> In my view I have: >> >> >> >> >From firebug I can see that the url built is correct and if I copy it >> directly into the browser, I can get the rendered text (some text >> here). >> But the ajax call causes an exception as if the routes couldn't be found: >> >> Processing ApplicationController#index (for 127.0.0.1 at 2008-10-28 >> 22:48:15) [POST] >> Session ID: 1b06418b3bbb49125147af6a-617977441 >> Parameters: {"fb_sig_time"=>"1225259294.7547", >> "fb_sig"=>"62540514b667f921ca9b2ba59d33ceb6", >> "fb_sig_in_new_facebook"=>"1", "fb_sig_locale"=>"en_US", >> "fb_sig_session_key"=>"1b06418b3bbb49125147af6a-617977441", >> "fb_sig_expires"=>"1225345694", "fb_sig_added"=>"1", >> "fb_sig_is_ajax"=>"1", "fb_sig_api_key"=>"xxxxxx", >> "fb_sig_user"=>"xxxxx", "fb_sig_profile_update_time"=>"1218210790"} >> >> >> ActionController::MethodNotAllowed (Only get, put, and delete requests >> are allowed.): >> >> /Users/zlu/.gem/ruby/1.8/gems/actionpack-2.1.1/lib/action_controller/routing/recognition_optimisation.rb:65:in >> `recognize_path' >> >> /Users/zlu/.gem/ruby/1.8/gems/actionpack-2.1.1/lib/action_controller/routing/route_set.rb:384:in >> `recognize' >> >> /Users/zlu/.gem/ruby/1.8/gems/actionpack-2.1.1/lib/action_controller/dispatcher.rb:148:in >> `handle_request' >> >> /Users/zlu/.gem/ruby/1.8/gems/actionpack-2.1.1/lib/action_controller/dispatcher.rb:107:in >> `dispatch' >> >> /Users/zlu/.gem/ruby/1.8/gems/actionpack-2.1.1/lib/action_controller/dispatcher.rb:104:in >> `synchronize' >> >> /Users/zlu/.gem/ruby/1.8/gems/actionpack-2.1.1/lib/action_controller/dispatcher.rb:104:in >> `dispatch' >> >> /Users/zlu/.gem/ruby/1.8/gems/actionpack-2.1.1/lib/action_controller/dispatcher.rb:120:in >> `dispatch_cgi' >> /Users/zlu/.gem/ruby/1.8/gems/actionpack-2.1.1/l >> >> I'm not sure what is wrong here, so any insight will be greatly >> appreciated. >> >> -- >> Zhao >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/facebooker-talk > > -- Zhao From jonathan.otto at gmail.com Wed Oct 29 22:15:33 2008 From: jonathan.otto at gmail.com (Jonathan Otto) Date: Wed, 29 Oct 2008 21:15:33 -0500 Subject: [Facebooker-talk] ajax + facebooker In-Reply-To: References: Message-ID: You can add &_method=get to the URL to force a GET request. On Wed, Oct 29, 2008 at 1:01 AM, Zhao Lu wrote: > I'm trying to get something similar to example2 in the following link working: > http://jnylund.typepad.com/joels_blog/2008/02/ajax-rails-face.html > > I have defined a function in my AccountsController: > > def load_accounts_for_contact > render :text => "some text here", :layout => false > end > > I have defined the routes for it: > map.resources :contacts, :path_prefix => "/users/:user_id", > :name_prefix => "user_" do |contact| > contact.resources :accounts, :collection => { > :load_accounts_for_contact => :get } > end > > In my view I have: > > > > >From firebug I can see that the url built is correct and if I copy it > directly into the browser, I can get the rendered text (some text > here). > But the ajax call causes an exception as if the routes couldn't be found: > > Processing ApplicationController#index (for 127.0.0.1 at 2008-10-28 > 22:48:15) [POST] > Session ID: 1b06418b3bbb49125147af6a-617977441 > Parameters: {"fb_sig_time"=>"1225259294.7547", > "fb_sig"=>"62540514b667f921ca9b2ba59d33ceb6", > "fb_sig_in_new_facebook"=>"1", "fb_sig_locale"=>"en_US", > "fb_sig_session_key"=>"1b06418b3bbb49125147af6a-617977441", > "fb_sig_expires"=>"1225345694", "fb_sig_added"=>"1", > "fb_sig_is_ajax"=>"1", "fb_sig_api_key"=>"xxxxxx", > "fb_sig_user"=>"xxxxx", "fb_sig_profile_update_time"=>"1218210790"} > > > ActionController::MethodNotAllowed (Only get, put, and delete requests > are allowed.): > /Users/zlu/.gem/ruby/1.8/gems/actionpack-2.1.1/lib/action_controller/routing/recognition_optimisation.rb:65:in > `recognize_path' > /Users/zlu/.gem/ruby/1.8/gems/actionpack-2.1.1/lib/action_controller/routing/route_set.rb:384:in > `recognize' > /Users/zlu/.gem/ruby/1.8/gems/actionpack-2.1.1/lib/action_controller/dispatcher.rb:148:in > `handle_request' > /Users/zlu/.gem/ruby/1.8/gems/actionpack-2.1.1/lib/action_controller/dispatcher.rb:107:in > `dispatch' > /Users/zlu/.gem/ruby/1.8/gems/actionpack-2.1.1/lib/action_controller/dispatcher.rb:104:in > `synchronize' > /Users/zlu/.gem/ruby/1.8/gems/actionpack-2.1.1/lib/action_controller/dispatcher.rb:104:in > `dispatch' > /Users/zlu/.gem/ruby/1.8/gems/actionpack-2.1.1/lib/action_controller/dispatcher.rb:120:in > `dispatch_cgi' > /Users/zlu/.gem/ruby/1.8/gems/actionpack-2.1.1/l > > I'm not sure what is wrong here, so any insight will be greatly appreciated. > > -- > Zhao > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > From zhao.lu.us at gmail.com Thu Oct 30 02:17:59 2008 From: zhao.lu.us at gmail.com (Zhao Lu) Date: Wed, 29 Oct 2008 23:17:59 -0700 Subject: [Facebooker-talk] link_to with confirmation Message-ID: I'd like to get a link_to with confirmation to work inside facebook. I found Richard Jordan's posting on facebook_link_to but I didn't find it in the master branch on github. Is there any plan to merge it (soon-ish) or should I just go ahead and manually patch? -- Zhao From idavidcrockett at gmail.com Thu Oct 30 11:27:28 2008 From: idavidcrockett at gmail.com (David Crockett) Date: Thu, 30 Oct 2008 09:27:28 -0600 Subject: [Facebooker-talk] Facebooker.js stopped working? Message-ID: <980917B2-6730-4538-9E1E-EE870BA2931B@gmail.com> Hello, I woke up this morning and found that all of my JS stopped working last night. To get things working again I had to change facebooker.js from this: function $(element) { if (typeof element == "string") { element=document.getElementById(element); } if (element) extend_instance(element,Element); return element; } to this: function $(element) { return document.getElementById(element);; } has anyone else observed FBJS problems today? Best, David Crockett From zhao.lu.us at gmail.com Thu Oct 30 12:43:55 2008 From: zhao.lu.us at gmail.com (Zhao Lu) Date: Thu, 30 Oct 2008 09:43:55 -0700 Subject: [Facebooker-talk] Facebooker.js stopped working? In-Reply-To: <980917B2-6730-4538-9E1E-EE870BA2931B@gmail.com> References: <980917B2-6730-4538-9E1E-EE870BA2931B@gmail.com> Message-ID: I noticed that same thing after reading your email. Thanks so much for the fix. On Thu, Oct 30, 2008 at 8:27 AM, David Crockett wrote: > Hello, > > I woke up this morning and found that all of my JS stopped working last > night. To get things working again I had to change facebooker.js from this: > > function $(element) { > if (typeof element == "string") { > element=document.getElementById(element); > } > if (element) > extend_instance(element,Element); > return element; > } > > to this: > > function $(element) { > return document.getElementById(element);; > } > > has anyone else observed FBJS problems today? > > Best, > David Crockett > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > -- Zhao