From ben at bensinclair.com Wed May 13 19:05:32 2009 From: ben at bensinclair.com (Ben Sinclair) Date: Wed, 13 May 2009 18:05:32 -0500 Subject: [Facebooker-talk] Fan Page Applications? Message-ID: <623748070905131605i48ae7bb5y3b25b9d65023e4bf@mail.gmail.com> I'm trying to build a fan page application, but can't figure out how to authenticate and get a session. If I try the usual "ensure_authenticated_to_facebook" it attempts to redirect to the FB login. Is there a different way to get a session when you're inside a fan page application? Thanks! -- Ben Sinclair ben at bensinclair.com From mjfreshyfresh at gmail.com Wed May 13 19:55:22 2009 From: mjfreshyfresh at gmail.com (Michael Jones) Date: Wed, 13 May 2009 16:55:22 -0700 Subject: [Facebooker-talk] Fan Page Applications? In-Reply-To: <623748070905131605i48ae7bb5y3b25b9d65023e4bf@mail.gmail.com> References: <623748070905131605i48ae7bb5y3b25b9d65023e4bf@mail.gmail.com> Message-ID: <426797F2-F47E-4DEC-8E6C-04D7E63F7FE0@gmail.com> If you're in a Page tab you can't get a user session, get them over to your app... On May 13, 2009, at 4:05 PM, Ben Sinclair wrote: > I'm trying to build a fan page application, but can't figure out how > to authenticate and get a session. If I try the usual > "ensure_authenticated_to_facebook" it attempts to redirect to the FB > login. > > Is there a different way to get a session when you're inside a fan > page application? > > Thanks! > > -- > Ben Sinclair > ben at bensinclair.com > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk From stephane.akkaoui at imeuble.info Wed May 13 20:20:17 2009 From: stephane.akkaoui at imeuble.info (=?ISO-8859-1?Q?St=E9phane_Akkaoui?=) Date: Thu, 14 May 2009 02:20:17 +0200 Subject: [Facebooker-talk] Fan Page Applications? In-Reply-To: <426797F2-F47E-4DEC-8E6C-04D7E63F7FE0@gmail.com> References: <623748070905131605i48ae7bb5y3b25b9d65023e4bf@mail.gmail.com> <426797F2-F47E-4DEC-8E6C-04D7E63F7FE0@gmail.com> Message-ID: <944B3C0D-9766-4C0A-9FCA-DCC09CD5C8FB@imeuble.info> Or make them click somewhere to have a js event and an ajax request... -- St?phane Akkaoui Le 14 mai 09 ? 01:55, Michael Jones a ?crit : > If you're in a Page tab you can't get a user session, get them over > to your app... > > > On May 13, 2009, at 4:05 PM, Ben Sinclair wrote: > >> I'm trying to build a fan page application, but can't figure out how >> to authenticate and get a session. If I try the usual >> "ensure_authenticated_to_facebook" it attempts to redirect to the FB >> login. >> >> Is there a different way to get a session when you're inside a fan >> page application? >> >> Thanks! >> >> -- >> Ben Sinclair >> ben at bensinclair.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 From ben at bensinclair.com Mon May 18 16:43:05 2009 From: ben at bensinclair.com (Ben Sinclair) Date: Mon, 18 May 2009 15:43:05 -0500 Subject: [Facebooker-talk] Fan Page Applications? In-Reply-To: <944B3C0D-9766-4C0A-9FCA-DCC09CD5C8FB@imeuble.info> References: <623748070905131605i48ae7bb5y3b25b9d65023e4bf@mail.gmail.com> <426797F2-F47E-4DEC-8E6C-04D7E63F7FE0@gmail.com> <944B3C0D-9766-4C0A-9FCA-DCC09CD5C8FB@imeuble.info> Message-ID: <623748070905181343s5272941cvc808e76f581906ca@mail.gmail.com> Thanks, that makes sense! I'll send them out to a separate application. On Wed, May 13, 2009 at 7:20 PM, St?phane Akkaoui wrote: > Or make them click somewhere to have a js event and an ajax request... > > -- St?phane Akkaoui > > Le 14 mai 09 ? 01:55, Michael Jones a ?crit : > >> If you're in a Page tab you can't get a user session, get them over to >> your app... >> >> >> On May 13, 2009, at 4:05 PM, Ben Sinclair wrote: >> >>> I'm trying to build a fan page application, but can't figure out how >>> to authenticate and get a session. If I try the usual >>> "ensure_authenticated_to_facebook" it attempts to redirect to the FB >>> login. >>> >>> Is there a different way to get a session when you're inside a fan >>> page application? >>> >>> Thanks! >>> >>> -- >>> Ben Sinclair >>> ben at bensinclair.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 > > -- Ben Sinclair ben at bensinclair.com From ben at bensinclair.com Mon May 18 16:55:25 2009 From: ben at bensinclair.com (Ben Sinclair) Date: Mon, 18 May 2009 15:55:25 -0500 Subject: [Facebooker-talk] FQL Query for Pages Message-ID: <623748070905181355y434d4aa0k22a3813a7704e659@mail.gmail.com> Another question... I'm trying to do an FQL query for some fan page data, but it returns an empty array as the result: def update_from_fb fbs = Facebooker::Session.create results = fbs.fql_query("select name, page_url, fan_count, pic_square from page where page_id = #{self.page_id}") logger.debug "RESULTS: #{results.size} #{results.class}" end If I change that query to the user table and change my debug message, I can get an array with a working User object. I'm not sure why the page table doesn't return anything. I see that Facebooker has a Page class, with accessors for a lot of the page fields, so I was hoping to get one of those back. If I run my query in the test console it does return the data I'm looking for. Thanks! -- Ben Sinclair ben at bensinclair.com From robert.bjarnason at gmail.com Tue May 19 18:16:34 2009 From: robert.bjarnason at gmail.com (Robert Bjarnason) Date: Tue, 19 May 2009 22:16:34 +0000 Subject: [Facebooker-talk] Facebook app as part of a larger rails app handled by one controller In-Reply-To: References: Message-ID: <4A132FC2.2040905@gmail.com> Hi all, I'm as well in this situation where the url rewrite is messing up the relative urls in my other controllers/actions, in a large application. I'm currently using an old version of Facebooker on production where I hacked in a check for if fb_ parameters are present in the request - looking at the latest code this hack of mine does not seem to want to merge in nicely with all the changes since last year. I tried this now: http://rubyforge.org/pipermail/facebooker-talk/2008-January/000093.html but it does not work for me, are these instructions still valid? Any ideas? Any way to do this cleanly? Best regards, Robert Jesse Clark wrote: > Hi all, > > I found this thread from a while back which discusses the situation > where one wants to implement a Facebooker app that is handled by one > controller of a rails app: > http://rubyforge.org/pipermail/facebooker-talk/2008-January/000093.html > > I am in this situation with my app. Is the suggested best practice to > handle this still to change relative_url_root as David describes and > then add a route for: > > map.canvas_page_base( "#{ENV["FACEBOOK_APP_NAME"]}/:action/:id", > :controller => 'facebook' ) > > ? Or, has Facebooker been modified to allow this configuration without > hacking relative_url_root? > > What is the current suggestion for handling this situation? > > Thanks in advance, > -Jesse > > > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > From carlos at insignia4u.com Wed May 20 14:53:22 2009 From: carlos at insignia4u.com (Carlos Kozuszko) Date: Wed, 20 May 2009 15:53:22 -0300 Subject: [Facebooker-talk] Problem on rack_setup Message-ID: <83dd4ae20905201153ne3d763er9e0e1ae3032cc88a@mail.gmail.com> I'm having problems trying to set up facebooker on a Rails 2.3.2 project using :active_record_store for cookies. The problem happens because of this commit: http://github.com/mmangino/facebooker/commit/308770447db06433e505aaf27db2614cee213cc2 That code is trying to add the Rack::Facebook to the dispatch chain after ActionController::RewindableInput or ActionController::Session::CookieStore if the first one is not found. The problem in my case is that I'm not using cookies, so this sould fall back to ActiveRecord::SessionStore. I could provide a patch, but wanted to be sure if what I'm saying is correct. Thanks! Carlos K. -- http://www.ckozus.com http://www.insignia4u.com From mmangino at elevatedrails.com Thu May 21 08:19:46 2009 From: mmangino at elevatedrails.com (Mike Mangino) Date: Thu, 21 May 2009 08:19:46 -0400 Subject: [Facebooker-talk] Problem on rack_setup In-Reply-To: <83dd4ae20905201153ne3d763er9e0e1ae3032cc88a@mail.gmail.com> References: <83dd4ae20905201153ne3d763er9e0e1ae3032cc88a@mail.gmail.com> Message-ID: That sounds sane to me. Mike On May 20, 2009, at 2:53 PM, Carlos Kozuszko wrote: > I'm having problems trying to set up facebooker on a Rails 2.3.2 > project using :active_record_store for cookies. The problem happens > because of this commit: > > http://github.com/mmangino/facebooker/commit/308770447db06433e505aaf27db2614cee213cc2 > > That code is trying to add the Rack::Facebook to the dispatch chain > after ActionController::RewindableInput or > ActionController::Session::CookieStore if the first one is not found. > The problem in my case is that I'm not using cookies, so this sould > fall back to ActiveRecord::SessionStore. > > I could provide a patch, but wanted to be sure if what I'm saying is > correct. > > Thanks! > > Carlos K. > > > -- > http://www.ckozus.com > http://www.insignia4u.com > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk -- Mike Mangino http://www.elevatedrails.com