From vrish88 at gmail.com Mon Dec 1 12:29:57 2008 From: vrish88 at gmail.com (Michael Lavrisha) Date: Mon, 1 Dec 2008 09:29:57 -0800 Subject: [Facebooker-talk] sortable_element and Facebook Message-ID: <9475CA5B-46E4-4D77-89FE-2CEE55F1BAC7@gmail.com> Hello all, I am working on a Facebook application, using Facebooker, that utilizes the Scriptaculous helper: sortable_element. I have got it working fine on my local machine but when I view it in Facebook there are a number of javascript errors that come up because of the generated javascript. The errors are (in order): TypeError: Undefined value http://apps.facebook.com/fbml_static_get.php?src=...%3A4007%2Fjavascripts%2Feffects.js%3F1219101002&appid=35770759139&pv=1&sig=e639a923aa0dbed99d5d51c8d76c944c&filetype=js (line 24) controls.js requires including script.aculo.us' effects.js library ReferenceError: Can't find variable: a38770759139_Sortable Now I am not a javascript guru or for that matter a javascript ninja, so I don't really know what is going on. But I think it may be something to do with FBML and how facebook changes all the variable names in the javascript. Has anybody come across an error like this? Thanks for you help, Mike -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephane.akkaoui at imeuble.info Mon Dec 1 14:12:37 2008 From: stephane.akkaoui at imeuble.info (=?ISO-8859-1?Q?St=E9phane_Akkaoui?=) Date: Mon, 1 Dec 2008 20:12:37 +0100 Subject: [Facebooker-talk] sortable_element and Facebook In-Reply-To: <9475CA5B-46E4-4D77-89FE-2CEE55F1BAC7@gmail.com> References: <9475CA5B-46E4-4D77-89FE-2CEE55F1BAC7@gmail.com> Message-ID: <4A1FD8D9-4161-48BB-A08C-B1C932C34F85@imeuble.info> Hi, As you can see on the FBJS page (http://wiki.developers.facebook.com/index.php/FBJS ), there is some trouble using javascript on facebook : - Facebook redefined basic functions such as parentNode (redefined in getParentNode). - JavaScript code gets parsed, and any identifiers get prepended with your application ID. So, you can't use classical framework as it under facebook. I've started a project on porting Prototype and Scriptaculous for Facebook. It's mainly a work of rewriting stuff. It's not finish and I think it's not ready to be integrated in any plugin now. I want it to be included into facebooker, but I think for now it's too soon. You can find it on my github repository : http://github.com/meuble/yaps/tree/master I've not make Scriptaculous' Sortable.js passe on Facebook, but I've written almost 60-70% of Prototype and the entire Scriptaculous' DragDrop.js (with all options exluded snapping) library. Remember that it's still under development, and many part needs refactoring and a better rewriting. HTH, -- St?phane Akkaoui http://www.imeuble.info http://www.sociabliz.com Le 1 d?c. 08 ? 18:29, Michael Lavrisha a ?crit : > Hello all, > > I am working on a Facebook application, using Facebooker, that > utilizes the Scriptaculous helper: sortable_element. I have got it > working fine on my local machine but when I view it in Facebook > there are a number of javascript errors that come up because of the > generated javascript. > > The errors are (in order): > TypeError: Undefined value > http://apps.facebook.com/fbml_static_get.php?src=...%3A4007%2Fjavascripts%2Feffects.js%3F1219101002&appid=35770759139&pv=1&sig=e639a923aa0dbed99d5d51c8d76c944c&filetype=js > (line 24) > > controls.js requires including script.aculo.us' effects.js library > > ReferenceError: Can't find variable: a38770759139_Sortable > > Now I am not a javascript guru or for that matter a javascript > ninja, so I don't really know what is going on. But I think it may > be something to do with FBML and how facebook changes all the > variable names in the javascript. > > Has anybody come across an error like this? > > Thanks for you help, > Mike > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk From george at xapblog.com Mon Dec 1 16:21:16 2008 From: george at xapblog.com (George Deglin) Date: Mon, 1 Dec 2008 13:21:16 -0800 Subject: [Facebooker-talk] Rails 2.2 support In-Reply-To: <9C771FD0-90B0-41A9-91D8-F54E2E96D937@elevatedrails.com> References: <69C6C498-A142-49EA-9055-06639395FC5B@elevatedrails.com> <59578a2b0811191159i5b131d11u733f6a334d9f235@mail.gmail.com> <9C771FD0-90B0-41A9-91D8-F54E2E96D937@elevatedrails.com> Message-ID: I'm having an issue with using link_to from the publisher after upgrading to 2.2. Error is: can't convert String into Hash c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/url_rewriter.rb:130:in `merge' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/url_rewriter.rb:130:in `url_for' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/helpers/url_helper.rb:228:in `link_to' app/helpers/application_helper.rb:23:in `show_link' app/models/notification_publisher.rb:19:in `notification_text' Line 23 of application_helper.rb is: link_to h(org.name), organization_url(org) The problem appears to be caused by rails hitting url_for in url_rewriter, when it should be hitting url_for in url_helper. I dug into the problem a little bit but couldn't find a trivial fix. I worked around this by just writing the html for a link. On Wed, Nov 19, 2008 at 12:38 PM, Mike Mangino wrote: > > On Nov 19, 2008, at 2:59 PM, Victor Costan wrote: > > You already merged my changes that make Rails 2.2 happy. My app seems >> to work on 2.2RC2. >> > > Okay, that's good to know. It looks like I just need to fix the tests then. > > >> >> There's one outstanding issue that doesn't have a nice, clear >> solution. As of 2.2, concat complains that it doesn't need a binding >> argument anymore, and the old use is deprecated. On the other hand, >> removing that argument will break anyone who's not on 2.2 yet. >> >> Possible solutions: >> 1) define our own method that calls concat and does the right thing >> depending on the version of rails >> 2) make a git branch for rails 2.2 changes, make the change below in this >> branch >> 3) remove the binding argument everywhere and make people upgrade >> 4) do nothing >> > > That's annoying. I'm okay with the warnings for now. If anyone feels > strongly about it, they can create another level of indirection. > > Mike > > > >> >> Preferences? >> Victor >> >> >> >> On Wed, Nov 19, 2008 at 10:10 AM, Mike Mangino >> wrote: >> >>> I remember a while back that somebody had patches to make Facebooker work >>> on >>> Rails 2.2. Are those still around? I'd like to get them merged over the >>> next >>> couple of days. >>> >>> Mike >>> >>> -- >>> Mike Mangino >>> http://www.elevatedrails.com >>> >>> >>> >>> _______________________________________________ >>> 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 srjoseph at hawaii.edu Mon Dec 1 19:04:36 2008 From: srjoseph at hawaii.edu (Sam Joseph) Date: Mon, 01 Dec 2008 14:04:36 -1000 Subject: [Facebooker-talk] how to search this mailing list? Message-ID: <49347B94.8090509@hawaii.edu> Hi All, Does anyone have a good way of searching this mailing list? I am trying to work out why I get this error: 1) Failure: test_should_create_invitation_for_facebook(InvitationsControllerTest) [./test/functional/../../vendor/plugins/facebooker/lib/facebooker/rails/test_helpers.rb:6:in `assert_facebook_redirect_to' ./test/functional/invitations_controller_test.rb:22:in `test_should_create_invitation_for_facebook' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/testing/setup_and_teardown.rb:33:in `__send__' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/testing/setup_and_teardown.rb:33:in `run']: expected to not be nil. running my tests, and so far I have tracked it down to this line in test_helpers: assert_not_nil facebook_redirect_url which appears to rely on this: def facebook_redirect_url match = @response.body.match(/ SAM -- Sam Joseph, Ph.D. Co-Director Laboratory for Interactive Learning Technologies Department of Information and Computer Sciences University of Hawaii From srjoseph at hawaii.edu Mon Dec 1 19:07:39 2008 From: srjoseph at hawaii.edu (Sam Joseph) Date: Mon, 01 Dec 2008 14:07:39 -1000 Subject: [Facebooker-talk] how to search this mailing list? In-Reply-To: <49347B94.8090509@hawaii.edu> References: <49347B94.8090509@hawaii.edu> Message-ID: <49347C4B.7010909@hawaii.edu> BTW, I think I realised that my functional test problem is a result of having replaced the default redirect action, so I think I'm good there, but I'd still like to work out how to effectively search the mailing list archives. Ever thought of moving to Google Groups? CHEERS> SAM Sam Joseph wrote: > Hi All, > > Does anyone have a good way of searching this mailing list? > > I am trying to work out why I get this error: > > 1) Failure: > test_should_create_invitation_for_facebook(InvitationsControllerTest) > > [./test/functional/../../vendor/plugins/facebooker/lib/facebooker/rails/test_helpers.rb:6:in > `assert_facebook_redirect_to' > ./test/functional/invitations_controller_test.rb:22:in > `test_should_create_invitation_for_facebook' > > /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/testing/setup_and_teardown.rb:33:in > `__send__' > > /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/testing/setup_and_teardown.rb:33:in > `run']: > expected to not be nil. > > running my tests, and so far I have tracked it down to this line in > test_helpers: > > assert_not_nil facebook_redirect_url > > which appears to rely on this: > > def facebook_redirect_url > match = @response.body.match(/ match.nil? ? nil : match.captures[0] > end > > I was hoping to search the archives for the term > 'facebook_redirect_url' but could not find a search interface. > > Any suggestions on how to search the archives or for how to address > this testing problem will be most gratefully received. > > Many thanks in advance > CHEERS> SAM > -- Sam Joseph, Ph.D. Co-Director Laboratory for Interactive Learning Technologies Department of Information and Computer Sciences University of Hawaii From tres.wong-godfrey at saniq.com Mon Dec 1 19:13:12 2008 From: tres.wong-godfrey at saniq.com (Tres Wong-Godfrey) Date: Mon, 1 Dec 2008 16:13:12 -0800 Subject: [Facebooker-talk] Session Timeout With New Sessions Message-ID: I've been seeing an hourly session regeneration from the app that I'm currently developing. Every hour, on the hour, the session ID is changed. It really only becomes evident when doing AJAX posts to the callback server. When the page is re-rendered by FB servers, the new session id is automagically inserted & everything runs as expected. When doing an AJAX query, the old session is used, so the server promptly attempts to redirect the AJAX request -- which just renders as nothing. Does anyone know why this behavior is different with the new sessions? Is there some default timeout value that has been changed? Has anyone else been seeing this behavior? Is this a new 'feature' associated with apps that have not yet been approved? Thanks! Tres From mikemondragon at gmail.com Tue Dec 2 04:36:40 2008 From: mikemondragon at gmail.com (Mike Mondragon) Date: Tue, 2 Dec 2008 01:36:40 -0800 Subject: [Facebooker-talk] conflict with Get Exceptional and Facebooker in ActionController::Base#rescue_action Message-ID: <967d3b9a0812020136t3796c505kc44bf411c00c70fe@mail.gmail.com> I'm running a Rails 2.0.5 app, it serves normal content and Facebook content with Facebooker. I've been having a problem with Facebooker conflicting with the Get Exceptional exception tracker (http://github.com/contrast/exceptional/tree/master). When an exception is raised it makes a JSON package of the exception trace and request environment to post back to their server. However when it does this via ActionController::Base#rescue_action this exception thrown when a TCPSocket object has to_json called upon it. "Error sending exception data: can't convert Symbol into String" When we use the older email based Exception Notifier its resue_action is subverted by Facebooker as well. If the app is loaded without Facebooker both exception handlers operate as expected. I'd be grateful if anyone has some clues to give me about where I might a way to get everyone play together nicely. I've tried duck punching ActiveSupport::JSON.encode (activesupport/lib/active_support/json/encoding.rb) to handle exception nicely without success so far. Thanks! Mike From mmangino at elevatedrails.com Tue Dec 2 08:32:29 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Tue, 2 Dec 2008 08:32:29 -0500 Subject: [Facebooker-talk] Session Timeout With New Sessions In-Reply-To: References: Message-ID: On Dec 1, 2008, at 7:13 PM, Tres Wong-Godfrey wrote: > > I've been seeing an hourly session regeneration from the app that > I'm currently developing. Every hour, on the hour, the session ID is > changed. > It really only becomes evident when doing AJAX posts to the callback > server. When the page is re-rendered by FB servers, the new session > id is automagically inserted & everything runs as expected. When > doing an AJAX query, the old session is used, so the server promptly > attempts to redirect the AJAX request -- which just renders as > nothing. > > Does anyone know why this behavior is different with the new > sessions? Is there some default timeout value that has been changed? > Has anyone else been seeing this behavior? Is this a new 'feature' > associated with apps that have not yet been approved? > Yuck. The new sessions are supposed to expire in 1 hour. I hope that's not how they implemented them. I would file a bug on the Facebook bug tracker. It will either be fixed quickly or it will never be looked at :) Mike > Thanks! > > Tres > _______________________________________________ > 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 Dec 2 08:34:22 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Tue, 2 Dec 2008 08:34:22 -0500 Subject: [Facebooker-talk] conflict with Get Exceptional and Facebooker in ActionController::Base#rescue_action In-Reply-To: <967d3b9a0812020136t3796c505kc44bf411c00c70fe@mail.gmail.com> References: <967d3b9a0812020136t3796c505kc44bf411c00c70fe@mail.gmail.com> Message-ID: <7891AF60-B486-4C3F-9062-F8C504628C67@elevatedrails.com> That' really interesting. We've never seen problems with the old Exception notifier. There was a bug in exception notifier that caused that error, but it was an easy fix IIRC. We're currently using Hoptoad (http://www.hoptoadapp.com) with great luck. Mike On Dec 2, 2008, at 4:36 AM, Mike Mondragon wrote: > I'm running a Rails 2.0.5 app, it serves normal content and Facebook > content with Facebooker. I've been having a problem with Facebooker > conflicting with the Get Exceptional exception tracker > (http://github.com/contrast/exceptional/tree/master). When an > exception is raised it makes a JSON package of the exception trace and > request environment to post back to their server. However when it does > this via ActionController::Base#rescue_action this exception thrown > when a TCPSocket object has to_json called upon it. > "Error sending exception data: can't convert Symbol into String" > When we use the older email based Exception Notifier its resue_action > is subverted by Facebooker as well. If the app is loaded without > Facebooker both exception handlers operate as expected. > > I'd be grateful if anyone has some clues to give me about where I > might a way to get everyone play together nicely. > > I've tried duck punching ActiveSupport::JSON.encode > (activesupport/lib/active_support/json/encoding.rb) to handle > exception nicely without success so far. > > Thanks! > > Mike > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk -- Mike Mangino http://www.elevatedrails.com From mixonic at synitech.com Tue Dec 2 08:35:06 2008 From: mixonic at synitech.com (Matthew Beale) Date: Tue, 02 Dec 2008 08:35:06 -0500 Subject: [Facebooker-talk] Session Timeout With New Sessions In-Reply-To: References: Message-ID: <1228224906.8794.17.camel@localhost> Why would AJAX use the old session? Unless the params are being added to the Javascript at parse time. Hm. -- Matthew Beale :: 607 227 0871 Resume & Portfolio @ http://madhatted.com On Tue, 2008-12-02 at 08:32 -0500, Mike Mangino wrote: > On Dec 1, 2008, at 7:13 PM, Tres Wong-Godfrey wrote: > > > > > I've been seeing an hourly session regeneration from the app that > > I'm currently developing. Every hour, on the hour, the session ID is > > changed. > > It really only becomes evident when doing AJAX posts to the callback > > server. When the page is re-rendered by FB servers, the new session > > id is automagically inserted & everything runs as expected. When > > doing an AJAX query, the old session is used, so the server promptly > > attempts to redirect the AJAX request -- which just renders as > > nothing. > > > > Does anyone know why this behavior is different with the new > > sessions? Is there some default timeout value that has been changed? > > Has anyone else been seeing this behavior? Is this a new 'feature' > > associated with apps that have not yet been approved? > > > > Yuck. The new sessions are supposed to expire in 1 hour. I hope that's > not how they implemented them. I would file a bug on the Facebook bug > tracker. It will either be fixed quickly or it will never be looked > at :) > > Mike > > > > Thanks! > > > > Tres > > _______________________________________________ > > 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 From mmangino at elevatedrails.com Tue Dec 2 08:43:43 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Tue, 2 Dec 2008 08:43:43 -0500 Subject: [Facebooker-talk] Session Timeout With New Sessions In-Reply-To: <1228224906.8794.17.camel@localhost> References: <1228224906.8794.17.camel@localhost> Message-ID: <669B7BB7-13FF-4193-ABF8-91AB62CF8CF6@elevatedrails.com> That's a good question. Are you using the Facebook proxy or the direct connection? I would hope the proxy would handle this. Mike On Dec 2, 2008, at 8:35 AM, Matthew Beale wrote: > Why would AJAX use the old session? > > Unless the params are being added to the Javascript at parse time. > Hm. > > -- > Matthew Beale :: 607 227 0871 > Resume & Portfolio @ http://madhatted.com > > On Tue, 2008-12-02 at 08:32 -0500, Mike Mangino wrote: >> On Dec 1, 2008, at 7:13 PM, Tres Wong-Godfrey wrote: >> >>> >>> I've been seeing an hourly session regeneration from the app that >>> I'm currently developing. Every hour, on the hour, the session ID is >>> changed. >>> It really only becomes evident when doing AJAX posts to the callback >>> server. When the page is re-rendered by FB servers, the new session >>> id is automagically inserted & everything runs as expected. When >>> doing an AJAX query, the old session is used, so the server promptly >>> attempts to redirect the AJAX request -- which just renders as >>> nothing. >>> >>> Does anyone know why this behavior is different with the new >>> sessions? Is there some default timeout value that has been >>> changed? >>> Has anyone else been seeing this behavior? Is this a new 'feature' >>> associated with apps that have not yet been approved? >>> >> >> Yuck. The new sessions are supposed to expire in 1 hour. I hope >> that's >> not how they implemented them. I would file a bug on the Facebook bug >> tracker. It will either be fixed quickly or it will never be looked >> at :) >> >> Mike >> >> >>> Thanks! >>> >>> Tres >>> _______________________________________________ >>> 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 > > -- Mike Mangino http://www.elevatedrails.com From tres.wong-godfrey at saniq.com Tue Dec 2 10:31:58 2008 From: tres.wong-godfrey at saniq.com (Tres Wong-Godfrey) Date: Tue, 2 Dec 2008 07:31:58 -0800 Subject: [Facebooker-talk] Session Timeout With New Sessions In-Reply-To: <669B7BB7-13FF-4193-ABF8-91AB62CF8CF6@elevatedrails.com> References: <1228224906.8794.17.camel@localhost> <669B7BB7-13FF-4193-ABF8-91AB62CF8CF6@elevatedrails.com> Message-ID: <93DE56F9-728F-494C-9B34-1A9480925031@saniq.com> Everything is being routed through the proxy. I'm using both remote_form_for and have written some javascript functions to update divs using Ajax() both are exhibiting the same problem. I'm creating a bug report. Thank you! On Dec 2, 2008, at 5:43 AM, Mike Mangino wrote: > That's a good question. Are you using the Facebook proxy or the > direct connection? I would hope the proxy would handle this. > > Mike > > On Dec 2, 2008, at 8:35 AM, Matthew Beale wrote: > >> Why would AJAX use the old session? >> >> Unless the params are being added to the Javascript at parse time. >> Hm. >> >> -- >> Matthew Beale :: 607 227 0871 >> Resume & Portfolio @ http://madhatted.com >> >> On Tue, 2008-12-02 at 08:32 -0500, Mike Mangino wrote: >>> On Dec 1, 2008, at 7:13 PM, Tres Wong-Godfrey wrote: >>> >>>> >>>> I've been seeing an hourly session regeneration from the app that >>>> I'm currently developing. Every hour, on the hour, the session ID >>>> is >>>> changed. >>>> It really only becomes evident when doing AJAX posts to the >>>> callback >>>> server. When the page is re-rendered by FB servers, the new >>>> session >>>> id is automagically inserted & everything runs as expected. When >>>> doing an AJAX query, the old session is used, so the server >>>> promptly >>>> attempts to redirect the AJAX request -- which just renders as >>>> nothing. >>>> >>>> Does anyone know why this behavior is different with the new >>>> sessions? Is there some default timeout value that has been >>>> changed? >>>> Has anyone else been seeing this behavior? Is this a new 'feature' >>>> associated with apps that have not yet been approved? >>>> >>> >>> Yuck. The new sessions are supposed to expire in 1 hour. I hope >>> that's >>> not how they implemented them. I would file a bug on the Facebook >>> bug >>> tracker. It will either be fixed quickly or it will never be looked >>> at :) >>> >>> Mike >>> >>> >>>> Thanks! >>>> >>>> Tres >>>> _______________________________________________ >>>> 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 >> >> > > -- > Mike Mangino > http://www.elevatedrails.com > > > From mmangino at elevatedrails.com Tue Dec 2 11:48:15 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Tue, 2 Dec 2008 11:48:15 -0500 Subject: [Facebooker-talk] brown paper bag release Message-ID: <76060DE7-7C49-4CDA-A97A-A979DA41E02E@elevatedrails.com> I pushed a version of Facebooker yesterday that breaks all API requests if you disable API logging. It's unlikely that anyone updated and discovered that feature, but if you did, please update. Sorry about that everyone. Mike -- Mike Mangino http://www.elevatedrails.com From josh.m.sharpe at gmail.com Tue Dec 2 12:43:36 2008 From: josh.m.sharpe at gmail.com (Josh Sharpe) Date: Tue, 2 Dec 2008 12:43:36 -0500 Subject: [Facebooker-talk] mapping callback url to the correct controller Message-ID: <6a7129610812020943t5ff8ab9ep454c811f01156cb6@mail.gmail.com> First off, our default route is: map.connect ':locale/:controller/:action/:id' So I created a facebook controller which can be accessed at /en/facebook/ and I set up the callbackURL to be http://www.domain.com/en/facebook. This works and pulls up my index page just fine. But when I create a really simple link on that page: <%= link_to "Something Else", :action => :something %> It links to: /en/facebook/en/facebook/something and I obviously get a Routing error. So I tried to set up some routes.rb trickery: map.connect "/en/facebook/:locale/:controller/:action/:id" map.connect "/en/facebook/:locale/:controller/:action" This makes links point to: /en/facebook/en/facebook/en/facebook/something So there is some kind of circular action going on here. Any suggestions on how I can get out of this? -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephane.akkaoui at imeuble.info Tue Dec 2 12:52:02 2008 From: stephane.akkaoui at imeuble.info (=?ISO-8859-1?Q?St=E9phane_Akkaoui?=) Date: Tue, 2 Dec 2008 18:52:02 +0100 Subject: [Facebooker-talk] mapping callback url to the correct controller In-Reply-To: <6a7129610812020943t5ff8ab9ep454c811f01156cb6@mail.gmail.com> References: <6a7129610812020943t5ff8ab9ep454c811f01156cb6@mail.gmail.com> Message-ID: Le 2 d?c. 08 ? 18:43, Josh Sharpe a ?crit : > First off, our default route is: > map.connect ':locale/:controller/:action/:id' > > So I created a facebook controller which can be accessed at /en/ > facebook/ and I set up the callbackURL to be http://www.domain.com/en/facebook > . I think the mistake is here. Since your rails app run under http://www.domain.com/, why do you add en/facebook to your callback url ? If you do so, facebook will ad all routes to this and it will append what you says : http://www.domain.com/en/facebook/en/facebook/something > > This works and pulls up my index page just fine. But when I create > a really simple link on that page: > > <%= link_to "Something Else", :action => :something %> > > It links to: /en/facebook/en/facebook/something and I obviously get > a Routing error. > > So I tried to set up some routes.rb trickery: > > map.connect "/en/facebook/:locale/:controller/:action/:id" > map.connect "/en/facebook/:locale/:controller/:action" > > This makes links point to: > /en/facebook/en/facebook/en/facebook/something > > So there is some kind of circular action going on here. > > Any suggestions on how I can get out of this? > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk From josh.m.sharpe at gmail.com Tue Dec 2 13:07:58 2008 From: josh.m.sharpe at gmail.com (Josh Sharpe) Date: Tue, 2 Dec 2008 13:07:58 -0500 Subject: [Facebooker-talk] mapping callback url to the correct controller In-Reply-To: References: <6a7129610812020943t5ff8ab9ep454c811f01156cb6@mail.gmail.com> Message-ID: <6a7129610812021007k771e1f96s87b65bf351a8e5fb@mail.gmail.com> Yea, our entire app is at root, but I can't point my facebook app to that, I want to point it right at the facebook controller. On Tue, Dec 2, 2008 at 12:52 PM, St?phane Akkaoui < stephane.akkaoui at imeuble.info> wrote: > > Le 2 d?c. 08 ? 18:43, Josh Sharpe a ?crit : > > First off, our default route is: >> map.connect ':locale/:controller/:action/:id' >> >> So I created a facebook controller which can be accessed at /en/facebook/ >> and I set up the callbackURL to be http://www.domain.com/en/facebook. >> > > I think the mistake is here. > Since your rails app run under http://www.domain.com/, why do you add > en/facebook to your callback url ? > If you do so, facebook will ad all routes to this and it will append what > you says : http://www.domain.com/en/facebook/en/facebook/something > > > >> This works and pulls up my index page just fine. But when I create a >> really simple link on that page: >> >> <%= link_to "Something Else", :action => :something %> >> >> It links to: /en/facebook/en/facebook/something and I obviously get a >> Routing error. >> >> So I tried to set up some routes.rb trickery: >> >> map.connect "/en/facebook/:locale/:controller/:action/:id" >> map.connect "/en/facebook/:locale/:controller/:action" >> >> This makes links point to: >> /en/facebook/en/facebook/en/facebook/something >> >> So there is some kind of circular action going on here. >> >> Any suggestions on how I can get out of this? >> _______________________________________________ >> 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 mikemondragon at gmail.com Tue Dec 2 14:00:09 2008 From: mikemondragon at gmail.com (Mike Mondragon) Date: Tue, 2 Dec 2008 11:00:09 -0800 Subject: [Facebooker-talk] conflict with Get Exceptional and Facebooker in ActionController::Base#rescue_action In-Reply-To: <7891AF60-B486-4C3F-9062-F8C504628C67@elevatedrails.com> References: <967d3b9a0812020136t3796c505kc44bf411c00c70fe@mail.gmail.com> <7891AF60-B486-4C3F-9062-F8C504628C67@elevatedrails.com> Message-ID: <967d3b9a0812021100jcac027ep120f67b56924185b@mail.gmail.com> Upgrading to the latest Exception Notifier worked for us, thanks for the tip. I'll have to look at their bug fix and see if I can apply it to Get Exceptional's plugin. Thanks Mike On Tue, Dec 2, 2008 at 5:34 AM, Mike Mangino wrote: > That' really interesting. We've never seen problems with the old Exception > notifier. There was a bug in exception notifier that caused that error, but > it was an easy fix IIRC. We're currently using Hoptoad > (http://www.hoptoadapp.com) with great luck. > > Mike > > On Dec 2, 2008, at 4:36 AM, Mike Mondragon wrote: > >> I'm running a Rails 2.0.5 app, it serves normal content and Facebook >> content with Facebooker. I've been having a problem with Facebooker >> conflicting with the Get Exceptional exception tracker >> (http://github.com/contrast/exceptional/tree/master). When an >> exception is raised it makes a JSON package of the exception trace and >> request environment to post back to their server. However when it does >> this via ActionController::Base#rescue_action this exception thrown >> when a TCPSocket object has to_json called upon it. >> "Error sending exception data: can't convert Symbol into String" >> When we use the older email based Exception Notifier its resue_action >> is subverted by Facebooker as well. If the app is loaded without >> Facebooker both exception handlers operate as expected. >> >> I'd be grateful if anyone has some clues to give me about where I >> might a way to get everyone play together nicely. >> >> I've tried duck punching ActiveSupport::JSON.encode >> (activesupport/lib/active_support/json/encoding.rb) to handle >> exception nicely without success so far. >> >> Thanks! >> >> Mike >> _______________________________________________ >> 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 Dec 2 14:04:25 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Tue, 2 Dec 2008 14:04:25 -0500 Subject: [Facebooker-talk] mapping callback url to the correct controller In-Reply-To: <6a7129610812021007k771e1f96s87b65bf351a8e5fb@mail.gmail.com> References: <6a7129610812020943t5ff8ab9ep454c811f01156cb6@mail.gmail.com> <6a7129610812021007k771e1f96s87b65bf351a8e5fb@mail.gmail.com> Message-ID: On Dec 2, 2008, at 1:07 PM, Josh Sharpe wrote: > Yea, our entire app is at root, but I can't point my facebook app to > that, I want to point it right at the facebook controller. Why not? I would just add a before filter on the application controller that redirects requests to your facebook controller, then skip the filter on that. Facebooker doesn't work with a callback url that points to anything but the root path. Mike > > > On Tue, Dec 2, 2008 at 12:52 PM, St?phane Akkaoui > wrote: > > Le 2 d?c. 08 ? 18:43, Josh Sharpe a ?crit : > > > First off, our default route is: > map.connect ':locale/:controller/:action/:id' > > So I created a facebook controller which can be accessed at /en/ > facebook/ and I set up the callbackURL to be http://www.domain.com/en/facebook > . > > I think the mistake is here. > Since your rails app run under http://www.domain.com/, why do you > add en/facebook to your callback url ? > If you do so, facebook will ad all routes to this and it will append > what you says : http://www.domain.com/en/facebook/en/facebook/something > > > > This works and pulls up my index page just fine. But when I create > a really simple link on that page: > > <%= link_to "Something Else", :action => :something %> > > It links to: /en/facebook/en/facebook/something and I obviously get > a Routing error. > > So I tried to set up some routes.rb trickery: > > map.connect "/en/facebook/:locale/:controller/:action/:id" > map.connect "/en/facebook/:locale/:controller/:action" > > This makes links point to: > /en/facebook/en/facebook/en/facebook/something > > So there is some kind of circular action going on here. > > Any suggestions on how I can get out of this? > _______________________________________________ > 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 josh.m.sharpe at gmail.com Tue Dec 2 14:07:51 2008 From: josh.m.sharpe at gmail.com (Josh Sharpe) Date: Tue, 2 Dec 2008 14:07:51 -0500 Subject: [Facebooker-talk] mapping callback url to the correct controller In-Reply-To: References: <6a7129610812020943t5ff8ab9ep454c811f01156cb6@mail.gmail.com> <6a7129610812021007k771e1f96s87b65bf351a8e5fb@mail.gmail.com> Message-ID: <6a7129610812021107p271ac65ai69ef1fd520a54a14@mail.gmail.com> How would you identify a facebook app versus any other request? On Tue, Dec 2, 2008 at 2:04 PM, Mike Mangino wrote: > > On Dec 2, 2008, at 1:07 PM, Josh Sharpe wrote: > > Yea, our entire app is at root, but I can't point my facebook app to that, >> I want to point it right at the facebook controller. >> > > Why not? I would just add a before filter on the application controller > that redirects requests to your facebook controller, then skip the filter on > that. Facebooker doesn't work with a callback url that points to anything > but the root path. > > Mike > > > > >> >> On Tue, Dec 2, 2008 at 12:52 PM, St?phane Akkaoui < >> stephane.akkaoui at imeuble.info> wrote: >> >> Le 2 d?c. 08 ? 18:43, Josh Sharpe a ?crit : >> >> >> First off, our default route is: >> map.connect ':locale/:controller/:action/:id' >> >> So I created a facebook controller which can be accessed at /en/facebook/ >> and I set up the callbackURL to be http://www.domain.com/en/facebook. >> >> I think the mistake is here. >> Since your rails app run under http://www.domain.com/, why do you add >> en/facebook to your callback url ? >> If you do so, facebook will ad all routes to this and it will append what >> you says : http://www.domain.com/en/facebook/en/facebook/something >> >> >> >> This works and pulls up my index page just fine. But when I create a >> really simple link on that page: >> >> <%= link_to "Something Else", :action => :something %> >> >> It links to: /en/facebook/en/facebook/something and I obviously get a >> Routing error. >> >> So I tried to set up some routes.rb trickery: >> >> map.connect "/en/facebook/:locale/:controller/:action/:id" >> map.connect "/en/facebook/:locale/:controller/:action" >> >> This makes links point to: >> /en/facebook/en/facebook/en/facebook/something >> >> So there is some kind of circular action going on here. >> >> Any suggestions on how I can get out of this? >> _______________________________________________ >> 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 mmangino at elevatedrails.com Tue Dec 2 15:25:14 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Tue, 2 Dec 2008 15:25:14 -0500 Subject: [Facebooker-talk] mapping callback url to the correct controller In-Reply-To: <6a7129610812021107p271ac65ai69ef1fd520a54a14@mail.gmail.com> References: <6a7129610812020943t5ff8ab9ep454c811f01156cb6@mail.gmail.com> <6a7129610812021007k771e1f96s87b65bf351a8e5fb@mail.gmail.com> <6a7129610812021107p271ac65ai69ef1fd520a54a14@mail.gmail.com> Message-ID: Facebook sends a whole host of parameters to you. You can look at those and make the determination. Facebooker adds a request_if_from_facebook? method to the controller I believe. Mike On Dec 2, 2008, at 2:07 PM, Josh Sharpe wrote: > How would you identify a facebook app versus any other request? > > On Tue, Dec 2, 2008 at 2:04 PM, Mike Mangino > wrote: > > On Dec 2, 2008, at 1:07 PM, Josh Sharpe wrote: > > Yea, our entire app is at root, but I can't point my facebook app to > that, I want to point it right at the facebook controller. > > Why not? I would just add a before filter on the application > controller that redirects requests to your facebook controller, then > skip the filter on that. Facebooker doesn't work with a callback url > that points to anything but the root path. > > Mike > > > > > > On Tue, Dec 2, 2008 at 12:52 PM, St?phane Akkaoui > wrote: > > Le 2 d?c. 08 ? 18:43, Josh Sharpe a ?crit : > > > First off, our default route is: > map.connect ':locale/:controller/:action/:id' > > So I created a facebook controller which can be accessed at /en/ > facebook/ and I set up the callbackURL to be http://www.domain.com/en/facebook > . > > I think the mistake is here. > Since your rails app run under http://www.domain.com/, why do you > add en/facebook to your callback url ? > If you do so, facebook will ad all routes to this and it will append > what you says : http://www.domain.com/en/facebook/en/facebook/something > > > > This works and pulls up my index page just fine. But when I create > a really simple link on that page: > > <%= link_to "Something Else", :action => :something %> > > It links to: /en/facebook/en/facebook/something and I obviously get > a Routing error. > > So I tried to set up some routes.rb trickery: > > map.connect "/en/facebook/:locale/:controller/:action/:id" > map.connect "/en/facebook/:locale/:controller/:action" > > This makes links point to: > /en/facebook/en/facebook/en/facebook/something > > So there is some kind of circular action going on here. > > Any suggestions on how I can get out of this? > _______________________________________________ > 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 > > > > -- Mike Mangino http://www.elevatedrails.com From josh.m.sharpe at gmail.com Tue Dec 2 16:47:50 2008 From: josh.m.sharpe at gmail.com (Josh Sharpe) Date: Tue, 2 Dec 2008 16:47:50 -0500 Subject: [Facebooker-talk] using an infinite session to update user's status Message-ID: <6a7129610812021347q323aa0dq94030d6b5e4afbc4@mail.gmail.com> I've gathered so far how to ask a user to enable offline access and check for it, so that's fine. I can grab params[:fb_sig_session_key] if it's the session key to grab, it doesn't quite look right with the format: "8cb8860ab37403b844500d32-15600302" So is this the right session key to get or do i need it from somewhere else? My next question is how to create the new Facebooker::User instance and update its status. I was able to get a user object with this: Facebooker::User.new(facebook_user_id,Facebooker::Session.new(my_api_key,my_secret_key)) but I'm clearly not using the infinite key and dont know where to do so. Once I have the user object I know how to update the status, that's easy enough... Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: From mmangino at elevatedrails.com Tue Dec 2 17:19:37 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Tue, 2 Dec 2008 17:19:37 -0500 Subject: [Facebooker-talk] using an infinite session to update user's status In-Reply-To: <6a7129610812021347q323aa0dq94030d6b5e4afbc4@mail.gmail.com> References: <6a7129610812021347q323aa0dq94030d6b5e4afbc4@mail.gmail.com> Message-ID: <26D56342-4918-4B9A-846D-525B91252296@elevatedrails.com> Take a look at the FacebookerAuthentication plugin on github. This handles a lot of what you are trying to do. You can also check out the screencasts and Facebook book from http://www.pragprog.com (A shameless plug, I'm the author of all of the above) Mike On Dec 2, 2008, at 4:47 PM, Josh Sharpe wrote: > I've gathered so far how to ask a user to enable offline access and > check for it, so that's fine. > > I can grab params[:fb_sig_session_key] if it's the session key to > grab, it doesn't quite look right with the format: > "8cb8860ab37403b844500d32-15600302" > So is this the right session key to get or do i need it from > somewhere else? > > My next question is how to create the new Facebooker::User instance > and update its status. > > I was able to get a user object with this: > > Facebooker > ::User > .new > (facebook_user_id,Facebooker::Session.new(my_api_key,my_secret_key)) > > but I'm clearly not using the infinite key and dont know where to do > so. > > Once I have the user object I know how to update the status, that's > easy enough... > > Thanks! > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk -- Mike Mangino http://www.elevatedrails.com From mjfreshyfresh at gmail.com Tue Dec 2 19:10:57 2008 From: mjfreshyfresh at gmail.com (Michael Jones) Date: Tue, 2 Dec 2008 16:10:57 -0800 Subject: [Facebooker-talk] using an infinite session to update user's status In-Reply-To: <26D56342-4918-4B9A-846D-525B91252296@elevatedrails.com> References: <6a7129610812021347q323aa0dq94030d6b5e4afbc4@mail.gmail.com> <26D56342-4918-4B9A-846D-525B91252296@elevatedrails.com> Message-ID: <8509F504-F9E8-461E-889C-F1A33A1A2A65@gmail.com> I'm going to need to do this same sort of thing, thanks for the tips but I don't see any results for FacebookerAuthentication on github? http://github.com/search?q=FacebookerAuthentication On Dec 2, 2008, at 2:19 PM, Mike Mangino wrote: > Take a look at the FacebookerAuthentication plugin on github. This > handles a lot of what you are trying to do. You can also check out > the screencasts and Facebook book from http://www.pragprog.com (A > shameless plug, I'm the author of all of the above) > > Mike > > On Dec 2, 2008, at 4:47 PM, Josh Sharpe wrote: > >> I've gathered so far how to ask a user to enable offline access and >> check for it, so that's fine. >> >> I can grab params[:fb_sig_session_key] if it's the session key to >> grab, it doesn't quite look right with the format: >> "8cb8860ab37403b844500d32-15600302" >> So is this the right session key to get or do i need it from >> somewhere else? >> >> My next question is how to create the new Facebooker::User instance >> and update its status. >> >> I was able to get a user object with this: >> >> Facebooker >> ::User >> .new >> (facebook_user_id,Facebooker::Session.new(my_api_key,my_secret_key)) >> >> but I'm clearly not using the infinite key and dont know where to >> do so. >> >> Once I have the user object I know how to update the status, that's >> easy enough... >> >> Thanks! >> _______________________________________________ >> 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 From srjoseph at hawaii.edu Tue Dec 2 20:55:16 2008 From: srjoseph at hawaii.edu (Sam Joseph) Date: Tue, 02 Dec 2008 15:55:16 -1000 Subject: [Facebooker-talk] asserting redirect to root Message-ID: <4935E704.2030907@hawaii.edu> Hi all, Is there a better way to do this: def test_should_get_index_for_facebook facebook_get :index assert_facebook_redirect_to "http://#{Facebooker.canvas_server_base}#{Facebooker.facebook_path_prefix}/" end Many thanks in advance CHEERS> SAM p.s. I have such dejavu - I swear I sent this to the list already but can find no evidence that I sent it ... weird -- Sam Joseph, Ph.D. Co-Director Laboratory for Interactive Learning Technologies Department of Information and Computer Sciences University of Hawaii From mmangino at elevatedrails.com Tue Dec 2 22:52:47 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Tue, 2 Dec 2008 22:52:47 -0500 Subject: [Facebooker-talk] using an infinite session to update user's status In-Reply-To: <8509F504-F9E8-461E-889C-F1A33A1A2A65@gmail.com> References: <6a7129610812021347q323aa0dq94030d6b5e4afbc4@mail.gmail.com> <26D56342-4918-4B9A-846D-525B91252296@elevatedrails.com> <8509F504-F9E8-461E-889C-F1A33A1A2A65@gmail.com> Message-ID: Sorry, try facebooker_authentication Mike On Dec 2, 2008, at 7:10 PM, Michael Jones wrote: > I'm going to need to do this same sort of thing, thanks for the tips > but I don't see any results for FacebookerAuthentication on github? > > http://github.com/search?q=FacebookerAuthentication > > > On Dec 2, 2008, at 2:19 PM, Mike Mangino wrote: > >> Take a look at the FacebookerAuthentication plugin on github. This >> handles a lot of what you are trying to do. You can also check out >> the screencasts and Facebook book from http://www.pragprog.com (A >> shameless plug, I'm the author of all of the above) >> >> Mike >> >> On Dec 2, 2008, at 4:47 PM, Josh Sharpe wrote: >> >>> I've gathered so far how to ask a user to enable offline access >>> and check for it, so that's fine. >>> >>> I can grab params[:fb_sig_session_key] if it's the session key to >>> grab, it doesn't quite look right with the format: >>> "8cb8860ab37403b844500d32-15600302" >>> So is this the right session key to get or do i need it from >>> somewhere else? >>> >>> My next question is how to create the new Facebooker::User >>> instance and update its status. >>> >>> I was able to get a user object with this: >>> >>> Facebooker >>> ::User >>> .new >>> (facebook_user_id,Facebooker::Session.new(my_api_key,my_secret_key)) >>> >>> but I'm clearly not using the infinite key and dont know where to >>> do so. >>> >>> Once I have the user object I know how to update the status, >>> that's easy enough... >>> >>> Thanks! >>> _______________________________________________ >>> 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 josh.m.sharpe at gmail.com Wed Dec 3 11:50:47 2008 From: josh.m.sharpe at gmail.com (Josh Sharpe) Date: Wed, 3 Dec 2008 11:50:47 -0500 Subject: [Facebooker-talk] using an infinite session to update user's status In-Reply-To: References: <6a7129610812021347q323aa0dq94030d6b5e4afbc4@mail.gmail.com> <26D56342-4918-4B9A-846D-525B91252296@elevatedrails.com> <8509F504-F9E8-461E-889C-F1A33A1A2A65@gmail.com> Message-ID: <6a7129610812030850h57d7bd10g18d78cf2414d6437@mail.gmail.com> Not sure that either of those show me how to get the infinite session key? On Tue, Dec 2, 2008 at 10:52 PM, Mike Mangino wrote: > Sorry, try facebooker_authentication > > Mike > > > On Dec 2, 2008, at 7:10 PM, Michael Jones wrote: > > I'm going to need to do this same sort of thing, thanks for the tips but >> I don't see any results for FacebookerAuthentication on github? >> >> http://github.com/search?q=FacebookerAuthentication >> >> >> On Dec 2, 2008, at 2:19 PM, Mike Mangino wrote: >> >> Take a look at the FacebookerAuthentication plugin on github. This >>> handles a lot of what you are trying to do. You can also check out the >>> screencasts and Facebook book from http://www.pragprog.com (A shameless >>> plug, I'm the author of all of the above) >>> >>> Mike >>> >>> On Dec 2, 2008, at 4:47 PM, Josh Sharpe wrote: >>> >>> I've gathered so far how to ask a user to enable offline access and >>>> check for it, so that's fine. >>>> >>>> I can grab params[:fb_sig_session_key] if it's the session key to grab, >>>> it doesn't quite look right with the format: >>>> "8cb8860ab37403b844500d32-15600302" >>>> So is this the right session key to get or do i need it from somewhere >>>> else? >>>> >>>> My next question is how to create the new Facebooker::User instance and >>>> update its status. >>>> >>>> I was able to get a user object with this: >>>> >>>> >>>> Facebooker::User.new(facebook_user_id,Facebooker::Session.new(my_api_key,my_secret_key)) >>>> >>>> but I'm clearly not using the infinite key and dont know where to do so. >>>> >>>> Once I have the user object I know how to update the status, that's easy >>>> enough... >>>> >>>> Thanks! >>>> _______________________________________________ >>>> 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 > > > > _______________________________________________ > 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 lee at crossbonesystems.com Wed Dec 3 12:26:07 2008 From: lee at crossbonesystems.com (Lee Mallabone) Date: Wed, 3 Dec 2008 17:26:07 +0000 Subject: [Facebooker-talk] Form method=get signature failure In-Reply-To: References: Message-ID: I'm still seeing this behaviour on an app I have in development. My form (generated using the standard rails form_for) works fine until I add a :method => :get to the form_for. When submitting a GET form, the request fails with IncorrectSignature. >From this thread it looks like the issue was originally caused by a Facebook change? Is anyone else still seeing this issue? Am I right in assuming that forms on facebook canvas pages with method="GET" should normally work fine? Kind regards, Lee. 2008/9/26 Paul Covell : > Hi, this topic was originally posted here: > http://forums.pragprog.com/forums/59/topics/917 > > Quick summary: forms created method=GET fail with a signature validation > error: > Facebooker::Session::IncorrectSignature > (Facebooker::Session::IncorrectSignature): > /vendor/plugins/facebooker/lib/facebooker/rails/controller.rb:146:in > `verify_signature' > /vendor/plugins/facebooker/lib/facebooker/rails/controller.rb:120:in > `verified_facebook_params' > /vendor/plugins/facebooker/lib/facebooker/rails/controller.rb:35:in > `facebook_params' > /vendor/plugins/facebooker/lib/facebooker/rails/controller.rb:63:in > `valid_session_key_in_session?' > /vendor/plugins/facebooker/lib/facebooker/rails/controller.rb:41:in > `session_already_secured?' > > ////// > This can be reproduced with a small test application: > rails test > cd test > script/plugin install git://github.com/mmangino/facebooker.git > ruby script/generate controller home index search > > views/home/index.fbml.erb: > > >

Home

> <% form_tag(url_for(:action => :search), {:method=>:get}) do %> >

<%= text_field_tag(:keyword, params[:keyword]) %>

>

Go

> <% end %> > > app/controller/application.rb?added immediately below helper :all > > ensure_application_is_installed_by_facebook_user > ensure_authenticated_to_facebook > > And then I set up my development server and tunnel as I do with normal > development. The error is the same. Also, if I remove the :method => :get, > the error does not occur. > ////// > > I have done some additional digging tonight on the problem, and here is what > I've learned: > > 1. The verify_signature is working correctly (as expected) and calculating > on all values passed to it --- the calculation is actually rendering a > result inconsistent with the fb_sig passed to it. > 2. The hidden parameters from the form that appear in the URL are being > faithfully transmitted through Facebook to Facebooker and showing up > properly in verify_signature > 3. A copy + paste of the "raw string" generated by a working GET and a > failing GET are identical except the timestamp and the session expiration > time (of course). You can test a working GET by removing the parameters > from the URL letting facebook regenerate them. This way everything else is > identical. > > ==> I can only conclude that the fb_sig sent by facebook is being calculated > based on a different order of parameters or excluding some parameters, but I > don't know how to go about finding which ones (except brute force yuck). I > can't find any of the FB pages that offer any useful advice on this. > > Quick reference: > Forms and Hidden Inputs: > http://wiki.developers.facebook.com/index.php/UsageNotes/Forms > How Facebook Authenticates: > http://wiki.developers.facebook.com/index.php/How_Facebook_Authenticates_Your_Application > Verifying the Signature: > http://wiki.developers.facebook.com/index.php/Verifying_The_Signature > > -Paul > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > -- Lee Mallabone. Crossbone Systems Ltd. http://www.crossbonesystems.com/ http://www.fonicmonkey.net/ http://CambridgeWebHeads.ning.com/ From mmangino at elevatedrails.com Wed Dec 3 13:22:36 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Wed, 3 Dec 2008 13:22:36 -0500 Subject: [Facebooker-talk] using an infinite session to update user's status In-Reply-To: <6a7129610812030850h57d7bd10g18d78cf2414d6437@mail.gmail.com> References: <6a7129610812021347q323aa0dq94030d6b5e4afbc4@mail.gmail.com> <26D56342-4918-4B9A-846D-525B91252296@elevatedrails.com> <8509F504-F9E8-461E-889C-F1A33A1A2A65@gmail.com> <6a7129610812030850h57d7bd10g18d78cf2414d6437@mail.gmail.com> Message-ID: <3DC20EE0-5FC2-4CCD-9291-A76B45362D5E@elevatedrails.com> The infinite session key is just the session key of a user with the right permissions. Mike On Dec 3, 2008, at 11:50 AM, Josh Sharpe wrote: > Not sure that either of those show me how to get the infinite > session key? > > On Tue, Dec 2, 2008 at 10:52 PM, Mike Mangino > wrote: > Sorry, try facebooker_authentication > > Mike > > > On Dec 2, 2008, at 7:10 PM, Michael Jones wrote: > > I'm going to need to do this same sort of thing, thanks for the tips > but I don't see any results for FacebookerAuthentication on github? > > http://github.com/search?q=FacebookerAuthentication > > > On Dec 2, 2008, at 2:19 PM, Mike Mangino wrote: > > Take a look at the FacebookerAuthentication plugin on github. This > handles a lot of what you are trying to do. You can also check out > the screencasts and Facebook book from http://www.pragprog.com (A > shameless plug, I'm the author of all of the above) > > Mike > > On Dec 2, 2008, at 4:47 PM, Josh Sharpe wrote: > > I've gathered so far how to ask a user to enable offline access and > check for it, so that's fine. > > I can grab params[:fb_sig_session_key] if it's the session key to > grab, it doesn't quite look right with the format: > "8cb8860ab37403b844500d32-15600302" > So is this the right session key to get or do i need it from > somewhere else? > > My next question is how to create the new Facebooker::User instance > and update its status. > > I was able to get a user object with this: > > Facebooker > ::User > .new > (facebook_user_id,Facebooker::Session.new(my_api_key,my_secret_key)) > > but I'm clearly not using the infinite key and dont know where to do > so. > > Once I have the user object I know how to update the status, that's > easy enough... > > Thanks! > _______________________________________________ > 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 > > > > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > -- Mike Mangino http://www.elevatedrails.com From josh.m.sharpe at gmail.com Wed Dec 3 13:32:26 2008 From: josh.m.sharpe at gmail.com (Josh Sharpe) Date: Wed, 3 Dec 2008 13:32:26 -0500 Subject: [Facebooker-talk] using an infinite session to update user's status In-Reply-To: <3DC20EE0-5FC2-4CCD-9291-A76B45362D5E@elevatedrails.com> References: <6a7129610812021347q323aa0dq94030d6b5e4afbc4@mail.gmail.com> <26D56342-4918-4B9A-846D-525B91252296@elevatedrails.com> <8509F504-F9E8-461E-889C-F1A33A1A2A65@gmail.com> <6a7129610812030850h57d7bd10g18d78cf2414d6437@mail.gmail.com> <3DC20EE0-5FC2-4CCD-9291-A76B45362D5E@elevatedrails.com> Message-ID: <6a7129610812031032n7260f187l52c6d5da98c0b3d2@mail.gmail.com> So why is something like this returning nil? (this is basically taken from your facebooker_authentication plugin) user_session is taken from params[:fb_sig_session_key] user_id is taken from session[:facebook_session].user.id >> Facebooker::Session.create(api_key,secret).secure_with!(user_session_key,user_id) => nil If it matters params[:fb_sig_expires]* ==* "0" as well -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephane.akkaoui at imeuble.info Wed Dec 3 13:43:28 2008 From: stephane.akkaoui at imeuble.info (=?ISO-8859-1?Q?St=E9phane_Akkaoui?=) Date: Wed, 3 Dec 2008 19:43:28 +0100 Subject: [Facebooker-talk] using an infinite session to update user's status In-Reply-To: <6a7129610812031032n7260f187l52c6d5da98c0b3d2@mail.gmail.com> References: <6a7129610812021347q323aa0dq94030d6b5e4afbc4@mail.gmail.com> <26D56342-4918-4B9A-846D-525B91252296@elevatedrails.com> <8509F504-F9E8-461E-889C-F1A33A1A2A65@gmail.com> <6a7129610812030850h57d7bd10g18d78cf2414d6437@mail.gmail.com> <3DC20EE0-5FC2-4CCD-9291-A76B45362D5E@elevatedrails.com> <6a7129610812031032n7260f187l52c6d5da98c0b3d2@mail.gmail.com> Message-ID: <52DC935C-A1F6-4D86-B983-D8BEF6EEBA99@imeuble.info> I beleive you don't have to rebuild a new session. I think you just have to do something like : User.find_or_initialize_by_uid(facebook_params["user"]).status = "My status is updated by my app" Am I wrong ? -- St?phane Akkaoui Le 3 d?c. 08 ? 19:32, Josh Sharpe a ?crit : > So why is something like this returning nil? (this is basically > taken from your facebooker_authentication plugin) > > user_session is taken from params[:fb_sig_session_key] > user_id is taken from session[:facebook_session].user.id > > >> Facebooker::Session.create(api_key,secret).secure_with! > (user_session_key,user_id) > => nil > > If it matters params[:fb_sig_expires] == "0" as well > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk From josh.m.sharpe at gmail.com Wed Dec 3 13:47:19 2008 From: josh.m.sharpe at gmail.com (Josh Sharpe) Date: Wed, 3 Dec 2008 13:47:19 -0500 Subject: [Facebooker-talk] using an infinite session to update user's status In-Reply-To: <52DC935C-A1F6-4D86-B983-D8BEF6EEBA99@imeuble.info> References: <6a7129610812021347q323aa0dq94030d6b5e4afbc4@mail.gmail.com> <26D56342-4918-4B9A-846D-525B91252296@elevatedrails.com> <8509F504-F9E8-461E-889C-F1A33A1A2A65@gmail.com> <6a7129610812030850h57d7bd10g18d78cf2414d6437@mail.gmail.com> <3DC20EE0-5FC2-4CCD-9291-A76B45362D5E@elevatedrails.com> <6a7129610812031032n7260f187l52c6d5da98c0b3d2@mail.gmail.com> <52DC935C-A1F6-4D86-B983-D8BEF6EEBA99@imeuble.info> Message-ID: <6a7129610812031047t15e32564gd3b25b83c722d34c@mail.gmail.com> I would think that I have to build a new session if I'm running this from a cron. On Wed, Dec 3, 2008 at 1:43 PM, St?phane Akkaoui < stephane.akkaoui at imeuble.info> wrote: > I beleive you don't have to rebuild a new session. > I think you just have to do something like : > > User.find_or_initialize_by_uid(facebook_params["user"]).status = "My status > is updated by my app" > > Am I wrong ? > > -- > St?phane Akkaoui > > Le 3 d?c. 08 ? 19:32, Josh Sharpe a ?crit : > > So why is something like this returning nil? (this is basically taken >> from your facebooker_authentication plugin) >> >> user_session is taken from params[:fb_sig_session_key] >> user_id is taken from session[:facebook_session].user.id >> >> >> >> Facebooker::Session.create(api_key,secret).secure_with!(user_session_key,user_id) >> => nil >> >> If it matters params[:fb_sig_expires] == "0" as well >> _______________________________________________ >> 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 stephane.akkaoui at imeuble.info Wed Dec 3 14:27:32 2008 From: stephane.akkaoui at imeuble.info (=?ISO-8859-1?Q?St=E9phane_Akkaoui?=) Date: Wed, 3 Dec 2008 20:27:32 +0100 Subject: [Facebooker-talk] using an infinite session to update user's status In-Reply-To: <6a7129610812031047t15e32564gd3b25b83c722d34c@mail.gmail.com> References: <6a7129610812021347q323aa0dq94030d6b5e4afbc4@mail.gmail.com> <26D56342-4918-4B9A-846D-525B91252296@elevatedrails.com> <8509F504-F9E8-461E-889C-F1A33A1A2A65@gmail.com> <6a7129610812030850h57d7bd10g18d78cf2414d6437@mail.gmail.com> <3DC20EE0-5FC2-4CCD-9291-A76B45362D5E@elevatedrails.com> <6a7129610812031032n7260f187l52c6d5da98c0b3d2@mail.gmail.com> <52DC935C-A1F6-4D86-B983-D8BEF6EEBA99@imeuble.info> <6a7129610812031047t15e32564gd3b25b83c722d34c@mail.gmail.com> Message-ID: <5A5900F7-6C80-437D-A3E9-F25FD68F0829@imeuble.info> No you don't have. With a classical session (the user just authorize my app to access his datas), I can do : script/console Loading development environment (Rails 2.1.0) >> u = User.find(:last) => # >> u.name => "Jean-Bob Alister" But : >> u.status = "toto" Facebooker::Session::ExtendedPermissionRequired: Updating status requires the extended permission status_update Using the fb_prompt_permission helper, I ask the user to grant us permission to update his status. <%= fb_prompt_permission :status_update, "Can we update your status" %> After he has accepted, I'm able to do : >> u.status = "toto" => "toto" And the status of Jean Bob Alister is change to "toto. This exemple was made in a script/console. With a cronjob, you can use script/runner. HTH, -- St?phane Akkaoui http://www.sociabliz.com [en-fr] http://imeuble.info [fr] Le 3 d?c. 08 ? 19:47, Josh Sharpe a ?crit : > I would think that I have to build a new session if I'm running this > from a cron. > > On Wed, Dec 3, 2008 at 1:43 PM, St?phane Akkaoui > wrote: > I beleive you don't have to rebuild a new session. > I think you just have to do something like : > > User.find_or_initialize_by_uid(facebook_params["user"]).status = "My > status is updated by my app" > > Am I wrong ? > > -- > St?phane Akkaoui > > Le 3 d?c. 08 ? 19:32, Josh Sharpe a ?crit : > > So why is something like this returning nil? (this is basically > taken from your facebooker_authentication plugin) > > user_session is taken from params[:fb_sig_session_key] > user_id is taken from session[:facebook_session].user.id > > >> Facebooker::Session.create(api_key,secret).secure_with! > (user_session_key,user_id) > => nil > > If it matters params[:fb_sig_expires] == "0" as well > _______________________________________________ > 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 josh.m.sharpe at gmail.com Wed Dec 3 14:52:22 2008 From: josh.m.sharpe at gmail.com (Josh Sharpe) Date: Wed, 3 Dec 2008 14:52:22 -0500 Subject: [Facebooker-talk] using an infinite session to update user's status In-Reply-To: <5A5900F7-6C80-437D-A3E9-F25FD68F0829@imeuble.info> References: <6a7129610812021347q323aa0dq94030d6b5e4afbc4@mail.gmail.com> <26D56342-4918-4B9A-846D-525B91252296@elevatedrails.com> <8509F504-F9E8-461E-889C-F1A33A1A2A65@gmail.com> <6a7129610812030850h57d7bd10g18d78cf2414d6437@mail.gmail.com> <3DC20EE0-5FC2-4CCD-9291-A76B45362D5E@elevatedrails.com> <6a7129610812031032n7260f187l52c6d5da98c0b3d2@mail.gmail.com> <52DC935C-A1F6-4D86-B983-D8BEF6EEBA99@imeuble.info> <6a7129610812031047t15e32564gd3b25b83c722d34c@mail.gmail.com> <5A5900F7-6C80-437D-A3E9-F25FD68F0829@imeuble.info> Message-ID: <6a7129610812031152x1e12d313xf37e3c4b5d12fc71@mail.gmail.com> It looks like you have something mixed in to your user object that I don't. That's why I wanted to create a new instance of Facebooker::User every time I wanted to connect and update a status. On Wed, Dec 3, 2008 at 2:27 PM, St?phane Akkaoui < stephane.akkaoui at imeuble.info> wrote: > No you don't have. > > With a classical session (the user just authorize my app to access his > datas), I can do : > > script/console > Loading development environment (Rails 2.1.0) > >> u = User.find(:last) > => # "2.deYex4CTQLpCA3jQaAs3VQ__.XXX.XXXX-XXX...", session_expires: "2008-12-04 > 21:00:00", last_access: "2008-12-02 23:00:00", locale: "fr_FR", created_at: > "2008-12-03 19:06:04", updated_at: "2008-12-03 19:14:02"> > >> u.name > => "Jean-Bob Alister" > > But : > > >> u.status = "toto" > Facebooker::Session::ExtendedPermissionRequired: Updating status requires > the extended permission status_update > > Using the fb_prompt_permission helper, I ask the user to grant us > permission to update his status. > > <%= fb_prompt_permission :status_update, "Can we update your status" %> > > After he has accepted, I'm able to do : > > >> u.status = "toto" > => "toto" > > And the status of Jean Bob Alister is change to "toto. > > This exemple was made in a script/console. With a cronjob, you can use > script/runner. > > HTH, > > -- > St?phane Akkaoui > http://www.sociabliz.com [en-fr] > http://imeuble.info [fr] > > > > Le 3 d?c. 08 ? 19:47, Josh Sharpe a ?crit : > > > I would think that I have to build a new session if I'm running this from >> a cron. >> >> On Wed, Dec 3, 2008 at 1:43 PM, St?phane Akkaoui < >> stephane.akkaoui at imeuble.info> wrote: >> I beleive you don't have to rebuild a new session. >> I think you just have to do something like : >> >> User.find_or_initialize_by_uid(facebook_params["user"]).status = "My >> status is updated by my app" >> >> Am I wrong ? >> >> -- >> St?phane Akkaoui >> >> Le 3 d?c. 08 ? 19:32, Josh Sharpe a ?crit : >> >> So why is something like this returning nil? (this is basically taken >> from your facebooker_authentication plugin) >> >> user_session is taken from params[:fb_sig_session_key] >> user_id is taken from session[:facebook_session].user.id >> >> >> >> Facebooker::Session.create(api_key,secret).secure_with!(user_session_key,user_id) >> => nil >> >> If it matters params[:fb_sig_expires] == "0" as well >> _______________________________________________ >> 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 stephane.akkaoui at imeuble.info Wed Dec 3 15:25:04 2008 From: stephane.akkaoui at imeuble.info (=?ISO-8859-1?Q?St=E9phane_Akkaoui?=) Date: Wed, 3 Dec 2008 21:25:04 +0100 Subject: [Facebooker-talk] using an infinite session to update user's status In-Reply-To: <6a7129610812031152x1e12d313xf37e3c4b5d12fc71@mail.gmail.com> References: <6a7129610812021347q323aa0dq94030d6b5e4afbc4@mail.gmail.com> <26D56342-4918-4B9A-846D-525B91252296@elevatedrails.com> <8509F504-F9E8-461E-889C-F1A33A1A2A65@gmail.com> <6a7129610812030850h57d7bd10g18d78cf2414d6437@mail.gmail.com> <3DC20EE0-5FC2-4CCD-9291-A76B45362D5E@elevatedrails.com> <6a7129610812031032n7260f187l52c6d5da98c0b3d2@mail.gmail.com> <52DC935C-A1F6-4D86-B983-D8BEF6EEBA99@imeuble.info> <6a7129610812031047t15e32564gd3b25b83c722d34c@mail.gmail.com> <5A5900F7-6C80-437D-A3E9-F25FD68F0829@imeuble.info> <6a7129610812031152x1e12d313xf37e3c4b5d12fc71@mail.gmail.com> Message-ID: I give you my user.rb. But if you use facebooker_authentication, as Mike recomand you, you should have the same via the "include FacebookerAuthentication::Model". class User < ActiveRecord::Base validates_presence_of :uid attr_accessor :facebooker_user attr_accessor :facebooker_session def facebooker_user @facebooker_user ||= facebooker_session.user end def self.current_user @current_user end def self.current_user=(user) @current_user = user end def facebooker_session unless(@facebooker_session) @facebooker_session = Facebooker::Session.create(ENV['FACEBOOK_API_KEY'], ENV['FACEBOOK_SECRET_KEY']) @facebooker_session.secure_with!(self.session_key,self.uid,0) @facebooker_session.user.uid = self.uid end @facebooker_session end def method_missing(symbol , *args) begin value = super rescue NoMethodError, NameError => err if(facebooker_user.respond_to?(symbol)) return facebooker_user.send(symbol,*args) else throw err end end end end And the migration is : class CreateUsers < ActiveRecord::Migration def self.up create_table :users do |t| t.integer :uid, :null => false t.string :session_key t.string :session_expires t.datetime :last_access, :default => nil t.string :locale, :default => 'en_EN' t.timestamps end end def self.down drop_table :users end end Again, if you are using the Facebooker_authentication, you won't need all this.... HTH, -- St?phane Akkaoui http://www.socialbiz.com [en/fr] http://imeuble.info Le 3 d?c. 08 ? 20:52, Josh Sharpe a ?crit : > It looks like you have something mixed in to your user object that I > don't. That's why I wanted to create a new instance of > Facebooker::User every time I wanted to connect and update a status. > > On Wed, Dec 3, 2008 at 2:27 PM, St?phane Akkaoui > wrote: > No you don't have. > > With a classical session (the user just authorize my app to access > his datas), I can do : > > script/console > Loading development environment (Rails 2.1.0) > >> u = User.find(:last) > => # "2.deYex4CTQLpCA3jQaAs3VQ__.XXX.XXXX-XXX...", session_expires: > "2008-12-04 21:00:00", last_access: "2008-12-02 23:00:00", locale: > "fr_FR", created_at: "2008-12-03 19:06:04", updated_at: "2008-12-03 > 19:14:02"> > >> u.name > => "Jean-Bob Alister" > > But : > > >> u.status = "toto" > Facebooker::Session::ExtendedPermissionRequired: Updating status > requires the extended permission status_update > > Using the fb_prompt_permission helper, I ask the user to grant us > permission to update his status. > > <%= fb_prompt_permission :status_update, "Can we update your status" > %> > > After he has accepted, I'm able to do : > > >> u.status = "toto" > => "toto" > > And the status of Jean Bob Alister is change to "toto. > > This exemple was made in a script/console. With a cronjob, you can > use script/runner. > > HTH, > > -- > St?phane Akkaoui > http://www.sociabliz.com [en-fr] > http://imeuble.info [fr] > > > > Le 3 d?c. 08 ? 19:47, Josh Sharpe a ?crit : > > > I would think that I have to build a new session if I'm running this > from a cron. > > On Wed, Dec 3, 2008 at 1:43 PM, St?phane Akkaoui > wrote: > I beleive you don't have to rebuild a new session. > I think you just have to do something like : > > User.find_or_initialize_by_uid(facebook_params["user"]).status = "My > status is updated by my app" > > Am I wrong ? > > -- > St?phane Akkaoui > > Le 3 d?c. 08 ? 19:32, Josh Sharpe a ?crit : > > So why is something like this returning nil? (this is basically > taken from your facebooker_authentication plugin) > > user_session is taken from params[:fb_sig_session_key] > user_id is taken from session[:facebook_session].user.id > > >> Facebooker::Session.create(api_key,secret).secure_with! > (user_session_key,user_id) > => nil > > If it matters params[:fb_sig_expires] == "0" as well > _______________________________________________ > 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 From mmangino at elevatedrails.com Wed Dec 3 15:51:18 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Wed, 3 Dec 2008 15:51:18 -0500 Subject: [Facebooker-talk] Rails 2.2 support In-Reply-To: References: <69C6C498-A142-49EA-9055-06639395FC5B@elevatedrails.com> <59578a2b0811191159i5b131d11u733f6a334d9f235@mail.gmail.com> <9C771FD0-90B0-41A9-91D8-F54E2E96D937@elevatedrails.com> Message-ID: Sorry for the delay in getting this fixed. There was a lot of magic going on in the publisher that needed to be reworked. The good news is that the changes appear to work in 2.0, 2.1 and 2.2. Please test your application well before deploying with this release. We have reasonable test coverage of the publisher, but there is a lot of magic in there. Mike On Dec 1, 2008, at 4:21 PM, George Deglin wrote: > I'm having an issue with using link_to from the publisher after > upgrading to 2.2. > > Error is: > can't convert String into Hash > > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/url_rewriter.rb:130:in `merge' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/url_rewriter.rb:130:in `url_for' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/ > helpers/url_helper.rb:228:in `link_to' > app/helpers/application_helper.rb:23:in `show_link' > app/models/notification_publisher.rb:19:in `notification_text' > > Line 23 of application_helper.rb is: > link_to h(org.name), organization_url(org) > > The problem appears to be caused by rails hitting url_for in > url_rewriter, when it should be hitting url_for in url_helper. > > I dug into the problem a little bit but couldn't find a trivial fix. > I worked around this by just writing the html for a link. > > > > > On Wed, Nov 19, 2008 at 12:38 PM, Mike Mangino > wrote: > > On Nov 19, 2008, at 2:59 PM, Victor Costan wrote: > > You already merged my changes that make Rails 2.2 happy. My app seems > to work on 2.2RC2. > > Okay, that's good to know. It looks like I just need to fix the > tests then. > > > > > There's one outstanding issue that doesn't have a nice, clear > solution. As of 2.2, concat complains that it doesn't need a binding > argument anymore, and the old use is deprecated. On the other hand, > removing that argument will break anyone who's not on 2.2 yet. > > Possible solutions: > 1) define our own method that calls concat and does the right thing > depending on the version of rails > 2) make a git branch for rails 2.2 changes, make the change below in > this branch > 3) remove the binding argument everywhere and make people upgrade > 4) do nothing > > That's annoying. I'm okay with the warnings for now. If anyone feels > strongly about it, they can create another level of indirection. > > Mike > > > > > Preferences? > Victor > > > > On Wed, Nov 19, 2008 at 10:10 AM, Mike Mangino > wrote: > I remember a while back that somebody had patches to make Facebooker > work on > Rails 2.2. Are those still around? I'd like to get them merged over > the next > couple of days. > > Mike > > -- > Mike Mangino > http://www.elevatedrails.com > > > > _______________________________________________ > 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 > -- Mike Mangino http://www.elevatedrails.com From george at xapblog.com Wed Dec 3 16:08:45 2008 From: george at xapblog.com (George Deglin) Date: Wed, 3 Dec 2008 13:08:45 -0800 Subject: [Facebooker-talk] Rails 2.2 support In-Reply-To: References: <69C6C498-A142-49EA-9055-06639395FC5B@elevatedrails.com> <59578a2b0811191159i5b131d11u733f6a334d9f235@mail.gmail.com> <9C771FD0-90B0-41A9-91D8-F54E2E96D937@elevatedrails.com> Message-ID: Thanks for working on this. I was just about to start digging into it by myself. I'm still having the same problem as I described earlier. I'm including a custom helper module into my publisher, and then calling a function inside the helper module. The function calls link_to and generates the error I pasted earlier. This appears to be due to link_to inside of url_helper calling url_for inside of ActionController::UrlWriter instead of ActionView::Helpers::UrlHelper. On Wed, Dec 3, 2008 at 12:51 PM, Mike Mangino wrote: > Sorry for the delay in getting this fixed. > > There was a lot of magic going on in the publisher that needed to be > reworked. The good news is that the changes appear to work in 2.0, 2.1 and > 2.2. > > Please test your application well before deploying with this release. We > have reasonable test coverage of the publisher, but there is a lot of magic > in there. > > Mike > > > On Dec 1, 2008, at 4:21 PM, George Deglin wrote: > > I'm having an issue with using link_to from the publisher after upgrading >> to 2.2. >> >> Error is: >> can't convert String into Hash >> >> c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/url_rewriter.rb:130:in >> `merge' >> c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/url_rewriter.rb:130:in >> `url_for' >> c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/helpers/url_helper.rb:228:in >> `link_to' >> app/helpers/application_helper.rb:23:in `show_link' >> app/models/notification_publisher.rb:19:in `notification_text' >> >> Line 23 of application_helper.rb is: >> link_to h(org.name), organization_url(org) >> >> The problem appears to be caused by rails hitting url_for in url_rewriter, >> when it should be hitting url_for in url_helper. >> >> I dug into the problem a little bit but couldn't find a trivial fix. I >> worked around this by just writing the html for a link. >> >> >> >> >> On Wed, Nov 19, 2008 at 12:38 PM, Mike Mangino < >> mmangino at elevatedrails.com> wrote: >> >> On Nov 19, 2008, at 2:59 PM, Victor Costan wrote: >> >> You already merged my changes that make Rails 2.2 happy. My app seems >> to work on 2.2RC2. >> >> Okay, that's good to know. It looks like I just need to fix the tests >> then. >> >> >> >> >> There's one outstanding issue that doesn't have a nice, clear >> solution. As of 2.2, concat complains that it doesn't need a binding >> argument anymore, and the old use is deprecated. On the other hand, >> removing that argument will break anyone who's not on 2.2 yet. >> >> Possible solutions: >> 1) define our own method that calls concat and does the right thing >> depending on the version of rails >> 2) make a git branch for rails 2.2 changes, make the change below in this >> branch >> 3) remove the binding argument everywhere and make people upgrade >> 4) do nothing >> >> That's annoying. I'm okay with the warnings for now. If anyone feels >> strongly about it, they can create another level of indirection. >> >> Mike >> >> >> >> >> Preferences? >> Victor >> >> >> >> On Wed, Nov 19, 2008 at 10:10 AM, Mike Mangino >> wrote: >> I remember a while back that somebody had patches to make Facebooker work >> on >> Rails 2.2. Are those still around? I'd like to get them merged over the >> next >> couple of days. >> >> Mike >> >> -- >> Mike Mangino >> http://www.elevatedrails.com >> >> >> >> _______________________________________________ >> 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 >> >> > -- > Mike Mangino > http://www.elevatedrails.com > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From george at xapblog.com Wed Dec 3 16:11:46 2008 From: george at xapblog.com (George Deglin) Date: Wed, 3 Dec 2008 13:11:46 -0800 Subject: [Facebooker-talk] Rails 2.2 support In-Reply-To: References: <69C6C498-A142-49EA-9055-06639395FC5B@elevatedrails.com> <59578a2b0811191159i5b131d11u733f6a334d9f235@mail.gmail.com> <9C771FD0-90B0-41A9-91D8-F54E2E96D937@elevatedrails.com> Message-ID: Looks like I just got it working actually. I moved 'include ActionController::UrlWriter' in publisher.rb above the block where the helpers are included. Not sure if this might have any unintended side effects. On Wed, Dec 3, 2008 at 1:08 PM, George Deglin wrote: > Thanks for working on this. I was just about to start digging into it by > myself. > > I'm still having the same problem as I described earlier. I'm including a > custom helper module into my publisher, and then calling a function inside > the helper module. The function calls link_to and generates the error I > pasted earlier. > > This appears to be due to link_to inside of url_helper calling url_for > inside of ActionController::UrlWriter instead of > ActionView::Helpers::UrlHelper. > > > > > On Wed, Dec 3, 2008 at 12:51 PM, Mike Mangino wrote: > >> Sorry for the delay in getting this fixed. >> >> There was a lot of magic going on in the publisher that needed to be >> reworked. The good news is that the changes appear to work in 2.0, 2.1 and >> 2.2. >> >> Please test your application well before deploying with this release. We >> have reasonable test coverage of the publisher, but there is a lot of magic >> in there. >> >> Mike >> >> >> On Dec 1, 2008, at 4:21 PM, George Deglin wrote: >> >> I'm having an issue with using link_to from the publisher after upgrading >>> to 2.2. >>> >>> Error is: >>> can't convert String into Hash >>> >>> c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/url_rewriter.rb:130:in >>> `merge' >>> c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/url_rewriter.rb:130:in >>> `url_for' >>> c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/helpers/url_helper.rb:228:in >>> `link_to' >>> app/helpers/application_helper.rb:23:in `show_link' >>> app/models/notification_publisher.rb:19:in `notification_text' >>> >>> Line 23 of application_helper.rb is: >>> link_to h(org.name), organization_url(org) >>> >>> The problem appears to be caused by rails hitting url_for in >>> url_rewriter, when it should be hitting url_for in url_helper. >>> >>> I dug into the problem a little bit but couldn't find a trivial fix. I >>> worked around this by just writing the html for a link. >>> >>> >>> >>> >>> On Wed, Nov 19, 2008 at 12:38 PM, Mike Mangino < >>> mmangino at elevatedrails.com> wrote: >>> >>> On Nov 19, 2008, at 2:59 PM, Victor Costan wrote: >>> >>> You already merged my changes that make Rails 2.2 happy. My app seems >>> to work on 2.2RC2. >>> >>> Okay, that's good to know. It looks like I just need to fix the tests >>> then. >>> >>> >>> >>> >>> There's one outstanding issue that doesn't have a nice, clear >>> solution. As of 2.2, concat complains that it doesn't need a binding >>> argument anymore, and the old use is deprecated. On the other hand, >>> removing that argument will break anyone who's not on 2.2 yet. >>> >>> Possible solutions: >>> 1) define our own method that calls concat and does the right thing >>> depending on the version of rails >>> 2) make a git branch for rails 2.2 changes, make the change below in this >>> branch >>> 3) remove the binding argument everywhere and make people upgrade >>> 4) do nothing >>> >>> That's annoying. I'm okay with the warnings for now. If anyone feels >>> strongly about it, they can create another level of indirection. >>> >>> Mike >>> >>> >>> >>> >>> Preferences? >>> Victor >>> >>> >>> >>> On Wed, Nov 19, 2008 at 10:10 AM, Mike Mangino >>> wrote: >>> I remember a while back that somebody had patches to make Facebooker work >>> on >>> Rails 2.2. Are those still around? I'd like to get them merged over the >>> next >>> couple of days. >>> >>> Mike >>> >>> -- >>> Mike Mangino >>> http://www.elevatedrails.com >>> >>> >>> >>> _______________________________________________ >>> 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 >>> >>> >> -- >> Mike Mangino >> http://www.elevatedrails.com >> >> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mmangino at elevatedrails.com Wed Dec 3 16:18:23 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Wed, 3 Dec 2008 16:18:23 -0500 Subject: [Facebooker-talk] Rails 2.2 support In-Reply-To: References: <69C6C498-A142-49EA-9055-06639395FC5B@elevatedrails.com> <59578a2b0811191159i5b131d11u733f6a334d9f235@mail.gmail.com> <9C771FD0-90B0-41A9-91D8-F54E2E96D937@elevatedrails.com> Message-ID: <1AC6469E-A072-47DA-BEC7-7452344D1027@elevatedrails.com> Can you try the most recent version? I forgot to remove an include when I extracted my fix. Mike On Dec 3, 2008, at 4:08 PM, George Deglin wrote: > Thanks for working on this. I was just about to start digging into > it by myself. > > I'm still having the same problem as I described earlier. I'm > including a custom helper module into my publisher, and then calling > a function inside the helper module. The function calls link_to and > generates the error I pasted earlier. > > This appears to be due to link_to inside of url_helper calling > url_for inside of ActionController::UrlWriter instead of > ActionView::Helpers::UrlHelper. > > > > On Wed, Dec 3, 2008 at 12:51 PM, Mike Mangino > wrote: > Sorry for the delay in getting this fixed. > > There was a lot of magic going on in the publisher that needed to be > reworked. The good news is that the changes appear to work in 2.0, > 2.1 and 2.2. > > Please test your application well before deploying with this > release. We have reasonable test coverage of the publisher, but > there is a lot of magic in there. > > Mike > > > On Dec 1, 2008, at 4:21 PM, George Deglin wrote: > > I'm having an issue with using link_to from the publisher after > upgrading to 2.2. > > Error is: > can't convert String into Hash > > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/url_rewriter.rb:130:in `merge' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ > action_controller/url_rewriter.rb:130:in `url_for' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/ > helpers/url_helper.rb:228:in `link_to' > app/helpers/application_helper.rb:23:in `show_link' > app/models/notification_publisher.rb:19:in `notification_text' > > Line 23 of application_helper.rb is: > link_to h(org.name), organization_url(org) > > The problem appears to be caused by rails hitting url_for in > url_rewriter, when it should be hitting url_for in url_helper. > > I dug into the problem a little bit but couldn't find a trivial fix. > I worked around this by just writing the html for a link. > > > > > On Wed, Nov 19, 2008 at 12:38 PM, Mike Mangino > wrote: > > On Nov 19, 2008, at 2:59 PM, Victor Costan wrote: > > You already merged my changes that make Rails 2.2 happy. My app seems > to work on 2.2RC2. > > Okay, that's good to know. It looks like I just need to fix the > tests then. > > > > > There's one outstanding issue that doesn't have a nice, clear > solution. As of 2.2, concat complains that it doesn't need a binding > argument anymore, and the old use is deprecated. On the other hand, > removing that argument will break anyone who's not on 2.2 yet. > > Possible solutions: > 1) define our own method that calls concat and does the right thing > depending on the version of rails > 2) make a git branch for rails 2.2 changes, make the change below in > this branch > 3) remove the binding argument everywhere and make people upgrade > 4) do nothing > > That's annoying. I'm okay with the warnings for now. If anyone feels > strongly about it, they can create another level of indirection. > > Mike > > > > > Preferences? > Victor > > > > On Wed, Nov 19, 2008 at 10:10 AM, Mike Mangino > wrote: > I remember a while back that somebody had patches to make Facebooker > work on > Rails 2.2. Are those still around? I'd like to get them merged over > the next > couple of days. > > Mike > > -- > Mike Mangino > http://www.elevatedrails.com > > > > _______________________________________________ > 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 > > > -- > Mike Mangino > http://www.elevatedrails.com > > > > -- Mike Mangino http://www.elevatedrails.com From george at xapblog.com Wed Dec 3 16:30:51 2008 From: george at xapblog.com (George Deglin) Date: Wed, 3 Dec 2008 13:30:51 -0800 Subject: [Facebooker-talk] Rails 2.2 support In-Reply-To: <1AC6469E-A072-47DA-BEC7-7452344D1027@elevatedrails.com> References: <69C6C498-A142-49EA-9055-06639395FC5B@elevatedrails.com> <59578a2b0811191159i5b131d11u733f6a334d9f235@mail.gmail.com> <9C771FD0-90B0-41A9-91D8-F54E2E96D937@elevatedrails.com> <1AC6469E-A072-47DA-BEC7-7452344D1027@elevatedrails.com> Message-ID: Yeah, that worked. Thanks! On Wed, Dec 3, 2008 at 1:18 PM, Mike Mangino wrote: > Can you try the most recent version? I forgot to remove an include when I > extracted my fix. > > Mike > > > On Dec 3, 2008, at 4:08 PM, George Deglin wrote: > > Thanks for working on this. I was just about to start digging into it by >> myself. >> >> I'm still having the same problem as I described earlier. I'm including a >> custom helper module into my publisher, and then calling a function inside >> the helper module. The function calls link_to and generates the error I >> pasted earlier. >> >> This appears to be due to link_to inside of url_helper calling url_for >> inside of ActionController::UrlWriter instead of >> ActionView::Helpers::UrlHelper. >> >> >> >> On Wed, Dec 3, 2008 at 12:51 PM, Mike Mangino >> wrote: >> Sorry for the delay in getting this fixed. >> >> There was a lot of magic going on in the publisher that needed to be >> reworked. The good news is that the changes appear to work in 2.0, 2.1 and >> 2.2. >> >> Please test your application well before deploying with this release. We >> have reasonable test coverage of the publisher, but there is a lot of magic >> in there. >> >> Mike >> >> >> On Dec 1, 2008, at 4:21 PM, George Deglin wrote: >> >> I'm having an issue with using link_to from the publisher after upgrading >> to 2.2. >> >> Error is: >> can't convert String into Hash >> >> c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/url_rewriter.rb:130:in >> `merge' >> c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/url_rewriter.rb:130:in >> `url_for' >> c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/helpers/url_helper.rb:228:in >> `link_to' >> app/helpers/application_helper.rb:23:in `show_link' >> app/models/notification_publisher.rb:19:in `notification_text' >> >> Line 23 of application_helper.rb is: >> link_to h(org.name), organization_url(org) >> >> The problem appears to be caused by rails hitting url_for in url_rewriter, >> when it should be hitting url_for in url_helper. >> >> I dug into the problem a little bit but couldn't find a trivial fix. I >> worked around this by just writing the html for a link. >> >> >> >> >> On Wed, Nov 19, 2008 at 12:38 PM, Mike Mangino < >> mmangino at elevatedrails.com> wrote: >> >> On Nov 19, 2008, at 2:59 PM, Victor Costan wrote: >> >> You already merged my changes that make Rails 2.2 happy. My app seems >> to work on 2.2RC2. >> >> Okay, that's good to know. It looks like I just need to fix the tests >> then. >> >> >> >> >> There's one outstanding issue that doesn't have a nice, clear >> solution. As of 2.2, concat complains that it doesn't need a binding >> argument anymore, and the old use is deprecated. On the other hand, >> removing that argument will break anyone who's not on 2.2 yet. >> >> Possible solutions: >> 1) define our own method that calls concat and does the right thing >> depending on the version of rails >> 2) make a git branch for rails 2.2 changes, make the change below in this >> branch >> 3) remove the binding argument everywhere and make people upgrade >> 4) do nothing >> >> That's annoying. I'm okay with the warnings for now. If anyone feels >> strongly about it, they can create another level of indirection. >> >> Mike >> >> >> >> >> Preferences? >> Victor >> >> >> >> On Wed, Nov 19, 2008 at 10:10 AM, Mike Mangino >> wrote: >> I remember a while back that somebody had patches to make Facebooker work >> on >> Rails 2.2. Are those still around? I'd like to get them merged over the >> next >> couple of days. >> >> Mike >> >> -- >> Mike Mangino >> http://www.elevatedrails.com >> >> >> >> _______________________________________________ >> 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 >> >> >> -- >> Mike Mangino >> http://www.elevatedrails.com >> >> >> >> >> > -- > Mike Mangino > http://www.elevatedrails.com > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From marcdurden at gmail.com Thu Dec 4 00:24:33 2008 From: marcdurden at gmail.com (Marco Durden) Date: Wed, 3 Dec 2008 21:24:33 -0800 Subject: [Facebooker-talk] parameter passing before install lost after install??? Message-ID: I was wondering if anyone else is having problems with passing query string parameters upon install. For example, in the book Developing Facebook Platform Applications with Rails, the books example adds params[:from_id] into an invitation, so when another person signs up from the invitation, you can track who invited who. And that would make your friend in your dojo. I was using something like this before and eveything was working fine, but now it seems like it is not working anymore. Is anyone having similar problems? Is this something facebook does not allow anymore? Your feedback is very helpful. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mmangino at elevatedrails.com Thu Dec 4 09:28:41 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Thu, 4 Dec 2008 09:28:41 -0500 Subject: [Facebooker-talk] parameter passing before install lost after install??? In-Reply-To: References: Message-ID: <736B1288-CE95-4EE5-9F69-63E413C0F244@elevatedrails.com> On Dec 4, 2008, at 12:24 AM, Marco Durden wrote: > I was wondering if anyone else is having problems with passing query > string parameters upon install. For example, in the book Developing > Facebook Platform Applications with Rails, the books example adds > params[:from_id] into an invitation, so when another person signs up > from the invitation, you can track who invited who. And that would > make your friend in your dojo. I was using something like this > before and eveything was working fine, but now it seems like it is > not working anymore. Is anyone having similar problems? Is this > something facebook does not allow anymore? I think this changed in recent versions of the platform. If you set up a post authorize redirect URL, you can use the next parameter to keep parameters. You can see how I do this in the screencasts on http://www.pragprog.com . The code is in the facebooker_authentication plugin on github. Mike > > > Your feedback is very helpful. > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk -- Mike Mangino http://www.elevatedrails.com From dpnewman at gmail.com Thu Dec 4 12:48:31 2008 From: dpnewman at gmail.com (Dan Newman) Date: Thu, 4 Dec 2008 09:48:31 -0800 Subject: [Facebooker-talk] simple newbie quest ...how do you end an fb session Message-ID: <9d3959b70812040948h49e2f8e8m7ce8bd6804e697dc@mail.gmail.com> sorry - just getting into Facebooker ... what is best approach to ending the fb session? rather search for the answer - is that possible with these mail lists? thx -- web dev: www.polyrails.com artworks: www.danielnewman.info ph : 415-407-6239 :::::::::::::::::::::::::::::::::::::::::::::::::::::: -------------- next part -------------- An HTML attachment was scrubbed... URL: From dpnewman at gmail.com Thu Dec 4 14:03:58 2008 From: dpnewman at gmail.com (Dan Newman) Date: Thu, 4 Dec 2008 11:03:58 -0800 Subject: [Facebooker-talk] registering publish action Message-ID: <9d3959b70812041103w58d69546o91a1b1e3d6d1bd80@mail.gmail.com> I was trying to emulate the example given in the publisher.rb? # Before using, you must register your template by calling register. For this example # You would call TestPublisher.register_publish_action pastie of my class: http://pastie.org/331136 When i call in my controller ... fb_publisher = FBPublisher.new fb_publisher.register_publish_action I get: undefined method `register_publish_action' for # tia -- web dev: www.polyrails.com artworks: www.danielnewman.info ph : 415-407-6239 :::::::::::::::::::::::::::::::::::::::::::::::::::::: -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephane.akkaoui at imeuble.info Thu Dec 4 14:10:21 2008 From: stephane.akkaoui at imeuble.info (=?ISO-8859-1?Q?St=E9phane_Akkaoui?=) Date: Thu, 4 Dec 2008 20:10:21 +0100 Subject: [Facebooker-talk] registering publish action In-Reply-To: <9d3959b70812041103w58d69546o91a1b1e3d6d1bd80@mail.gmail.com> References: <9d3959b70812041103w58d69546o91a1b1e3d6d1bd80@mail.gmail.com> Message-ID: Hi, You don't need to instanciate the publisher. The register method is a class method. Just do : FBPublisher. register_publish_action HTH, -- St?phane Akkaoui http://www.socialbiz.com http://imeuble.info Le 4 d?c. 08 ? 20:03, Dan Newman a ?crit : > I was trying to emulate the example given in the publisher.rb? > > # Before using, you must register your template by calling register. > For this example > # You would call TestPublisher.register_publish_action > > pastie of my class: http://pastie.org/331136 > > When i call in my controller ... > > fb_publisher = FBPublisher.new > fb_publisher.register_publish_action > > I get: > > undefined method `register_publish_action' for # 0x247be34> > > tia > > > > -- > web dev: www.polyrails.com > artworks: www.danielnewman.info > ph : 415-407-6239 > :::::::::::::::::::::::::::::::::::::::::::::::::::::: > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk From dpnewman at gmail.com Thu Dec 4 14:24:31 2008 From: dpnewman at gmail.com (Dan Newman) Date: Thu, 4 Dec 2008 11:24:31 -0800 Subject: [Facebooker-talk] registering publish action In-Reply-To: References: <9d3959b70812041103w58d69546o91a1b1e3d6d1bd80@mail.gmail.com> Message-ID: <9d3959b70812041124g7c8e2df6k2e3a132a610f2b89@mail.gmail.com> Should I be manually creating the facebook_templates table? Mysql::Error: #42S02Table 'fbconnect_base_development.facebook_templates' doesn't exist: SHOW FIELDS FROM `facebook_templates` On Thu, Dec 4, 2008 at 11:10 AM, St?phane Akkaoui < stephane.akkaoui at imeuble.info> wrote: > Hi, > > You don't need to instanciate the publisher. The register method is a class > method. > > Just do : FBPublisher. register_publish_action > > HTH, > > -- > St?phane Akkaoui > http://www.socialbiz.com > http://imeuble.info > > Le 4 d?c. 08 ? 20:03, Dan Newman a ?crit : > > I was trying to emulate the example given in the publisher.rb? >> >> # Before using, you must register your template by calling register. For >> this example >> # You would call TestPublisher.register_publish_action >> >> pastie of my class: http://pastie.org/331136 >> >> When i call in my controller ... >> >> fb_publisher = FBPublisher.new >> fb_publisher.register_publish_action >> >> I get: >> >> undefined method `register_publish_action' for # >> >> tia >> >> >> >> -- >> web dev: www.polyrails.com >> artworks: www.danielnewman.info >> ph : 415-407-6239 >> :::::::::::::::::::::::::::::::::::::::::::::::::::::: >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/facebooker-talk >> > > -- web dev: www.polyrails.com artworks: www.danielnewman.info ph : 415-407-6239 :::::::::::::::::::::::::::::::::::::::::::::::::::::: -------------- next part -------------- An HTML attachment was scrubbed... URL: From dpnewman at gmail.com Thu Dec 4 14:33:53 2008 From: dpnewman at gmail.com (Dan Newman) Date: Thu, 4 Dec 2008 11:33:53 -0800 Subject: [Facebooker-talk] registering publish action In-Reply-To: References: <9d3959b70812041103w58d69546o91a1b1e3d6d1bd80@mail.gmail.com> Message-ID: <9d3959b70812041133j4905d7c1h3683de1aad58fa1c@mail.gmail.com> sorry - trigger fingers ... i see the generator now. regarding the facebook_templates On Thu, Dec 4, 2008 at 11:10 AM, St?phane Akkaoui < stephane.akkaoui at imeuble.info> wrote: > Hi, > > You don't need to instanciate the publisher. The register method is a class > method. > > Just do : FBPublisher. register_publish_action > > HTH, > > -- > St?phane Akkaoui > http://www.socialbiz.com > http://imeuble.info > > Le 4 d?c. 08 ? 20:03, Dan Newman a ?crit : > > I was trying to emulate the example given in the publisher.rb? >> >> # Before using, you must register your template by calling register. For >> this example >> # You would call TestPublisher.register_publish_action >> >> pastie of my class: http://pastie.org/331136 >> >> When i call in my controller ... >> >> fb_publisher = FBPublisher.new >> fb_publisher.register_publish_action >> >> I get: >> >> undefined method `register_publish_action' for # >> >> tia >> >> >> >> -- >> web dev: www.polyrails.com >> artworks: www.danielnewman.info >> ph : 415-407-6239 >> :::::::::::::::::::::::::::::::::::::::::::::::::::::: >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/facebooker-talk >> > > -- web dev: www.polyrails.com artworks: www.danielnewman.info ph : 415-407-6239 :::::::::::::::::::::::::::::::::::::::::::::::::::::: -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephane.akkaoui at imeuble.info Thu Dec 4 14:34:17 2008 From: stephane.akkaoui at imeuble.info (=?ISO-8859-1?Q?St=E9phane_Akkaoui?=) Date: Thu, 4 Dec 2008 20:34:17 +0100 Subject: [Facebooker-talk] registering publish action In-Reply-To: <9d3959b70812041124g7c8e2df6k2e3a132a610f2b89@mail.gmail.com> References: <9d3959b70812041103w58d69546o91a1b1e3d6d1bd80@mail.gmail.com> <9d3959b70812041124g7c8e2df6k2e3a132a610f2b89@mail.gmail.com> Message-ID: Not manually. User `rake db:migrate`. If you have used the generator (`script/generate publisher FB`) a migration should have been created. HTH, -- St?phane Akkaoui http://www.sociabliz.com http://imeuble.info Le 4 d?c. 08 ? 20:24, Dan Newman a ?crit : > Should I be manually creating the facebook_templates table? > > Mysql::Error: #42S02Table > 'fbconnect_base_development.facebook_templates' doesn't exist: SHOW > FIELDS FROM `facebook_templates` > > On Thu, Dec 4, 2008 at 11:10 AM, St?phane Akkaoui > wrote: > Hi, > > You don't need to instanciate the publisher. The register method is > a class method. > > Just do : FBPublisher. register_publish_action > > HTH, > > -- > St?phane Akkaoui > http://www.socialbiz.com > http://imeuble.info > > Le 4 d?c. 08 ? 20:03, Dan Newman a ?crit : > > I was trying to emulate the example given in the publisher.rb? > > # Before using, you must register your template by calling register. > For this example > # You would call TestPublisher.register_publish_action > > pastie of my class: http://pastie.org/331136 > > When i call in my controller ... > > fb_publisher = FBPublisher.new > fb_publisher.register_publish_action > > I get: > > undefined method `register_publish_action' for # 0x247be34> > > tia > > > > -- > web dev: www.polyrails.com > artworks: www.danielnewman.info > ph : 415-407-6239 > :::::::::::::::::::::::::::::::::::::::::::::::::::::: > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > > > > > -- > web dev: www.polyrails.com > artworks: www.danielnewman.info > ph : 415-407-6239 > :::::::::::::::::::::::::::::::::::::::::::::::::::::: From dpnewman at gmail.com Thu Dec 4 15:04:09 2008 From: dpnewman at gmail.com (Dan Newman) Date: Thu, 4 Dec 2008 12:04:09 -0800 Subject: [Facebooker-talk] registering publish action In-Reply-To: References: <9d3959b70812041103w58d69546o91a1b1e3d6d1bd80@mail.gmail.com> Message-ID: <9d3959b70812041204iecbfa8eo8afab850864744a7@mail.gmail.com> Inching forward ...could not figure out why this does not work FBPublisher.register_publish_action FBPublisher.deliver_action(@user) error method deprecated: http://pastie.org/331204 On Thu, Dec 4, 2008 at 11:10 AM, St?phane Akkaoui < stephane.akkaoui at imeuble.info> wrote: > Hi, > > You don't need to instanciate the publisher. The register method is a class > method. > > Just do : FBPublisher. register_publish_action > > HTH, > > -- > St?phane Akkaoui > http://www.socialbiz.com > http://imeuble.info > > Le 4 d?c. 08 ? 20:03, Dan Newman a ?crit : > > I was trying to emulate the example given in the publisher.rb? >> >> # Before using, you must register your template by calling register. For >> this example >> # You would call TestPublisher.register_publish_action >> >> pastie of my class: http://pastie.org/331136 >> >> When i call in my controller ... >> >> fb_publisher = FBPublisher.new >> fb_publisher.register_publish_action >> >> I get: >> >> undefined method `register_publish_action' for # >> >> tia >> >> >> >> -- >> web dev: www.polyrails.com >> artworks: www.danielnewman.info >> ph : 415-407-6239 >> :::::::::::::::::::::::::::::::::::::::::::::::::::::: >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/facebooker-talk >> > > -- web dev: www.polyrails.com artworks: www.danielnewman.info ph : 415-407-6239 :::::::::::::::::::::::::::::::::::::::::::::::::::::: -------------- next part -------------- An HTML attachment was scrubbed... URL: From dpnewman at gmail.com Thu Dec 4 15:40:48 2008 From: dpnewman at gmail.com (Dan Newman) Date: Thu, 4 Dec 2008 12:40:48 -0800 Subject: [Facebooker-talk] registering publish action In-Reply-To: <9d3959b70812041204iecbfa8eo8afab850864744a7@mail.gmail.com> References: <9d3959b70812041103w58d69546o91a1b1e3d6d1bd80@mail.gmail.com> <9d3959b70812041204iecbfa8eo8afab850864744a7@mail.gmail.com> Message-ID: <9d3959b70812041240n10df8409i681679580db1aa71@mail.gmail.com> solved it ...here: FBPublisher.register_publish_action(@user) FBPublisher.deliver_publish_action(@user) On Thu, Dec 4, 2008 at 12:04 PM, Dan Newman wrote: > Inching forward ...could not figure out why this does not work > > FBPublisher.register_publish_action > FBPublisher.deliver_action(@user) > > error method deprecated: http://pastie.org/331204 > > On Thu, Dec 4, 2008 at 11:10 AM, St?phane Akkaoui < > stephane.akkaoui at imeuble.info> wrote: > >> Hi, >> >> You don't need to instanciate the publisher. The register method is a >> class method. >> >> Just do : FBPublisher. register_publish_action >> >> HTH, >> >> -- >> St?phane Akkaoui >> http://www.socialbiz.com >> http://imeuble.info >> >> Le 4 d?c. 08 ? 20:03, Dan Newman a ?crit : >> >> I was trying to emulate the example given in the publisher.rb? >>> >>> # Before using, you must register your template by calling register. For >>> this example >>> # You would call TestPublisher.register_publish_action >>> >>> pastie of my class: http://pastie.org/331136 >>> >>> When i call in my controller ... >>> >>> fb_publisher = FBPublisher.new >>> fb_publisher.register_publish_action >>> >>> I get: >>> >>> undefined method `register_publish_action' for # >>> >>> tia >>> >>> >>> >>> -- >>> web dev: www.polyrails.com >>> artworks: www.danielnewman.info >>> ph : 415-407-6239 >>> :::::::::::::::::::::::::::::::::::::::::::::::::::::: >>> _______________________________________________ >>> Facebooker-talk mailing list >>> Facebooker-talk at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>> >> >> > > > -- > web dev: www.polyrails.com > artworks: www.danielnewman.info > ph : 415-407-6239 > :::::::::::::::::::::::::::::::::::::::::::::::::::::: > -- web dev: www.polyrails.com artworks: www.danielnewman.info ph : 415-407-6239 :::::::::::::::::::::::::::::::::::::::::::::::::::::: -------------- next part -------------- An HTML attachment was scrubbed... URL: From marcdurden at gmail.com Thu Dec 4 16:38:17 2008 From: marcdurden at gmail.com (Marco Durden) Date: Thu, 4 Dec 2008 13:38:17 -0800 Subject: [Facebooker-talk] parameter passing before install lost after install??? In-Reply-To: <736B1288-CE95-4EE5-9F69-63E413C0F244@elevatedrails.com> References: <736B1288-CE95-4EE5-9F69-63E413C0F244@elevatedrails.com> Message-ID: I think I found out why its not working. I was using "ensure_application_is_installed_by_facebook_user" and my logs were saying "Filter chain halted as [:ensure_application_is_installed_by_facebook_user] rendered_or_redirected." Because I am using facebooker_authentication, I am using the before_filter :facebook_login_required. I also wanted to make sure that the application is installed by the facebook user in order for them to access my app. How could I use ensure_application_is_instaled_by_facebook_user without losing the parameters on install? Is there a fix that could be incorporated into facebooker that would allow for parameter passing with this before_filter? If I understand correctly, facebook_login_required only makes sure that a user is logged into facebook, not that the user has the application installed. I would like to make sure that the user has the application installed as well. Best On Thu, Dec 4, 2008 at 6:28 AM, Mike Mangino wrote: > > On Dec 4, 2008, at 12:24 AM, Marco Durden wrote: > > I was wondering if anyone else is having problems with passing query >> string parameters upon install. For example, in the book Developing >> Facebook Platform Applications with Rails, the books example adds >> params[:from_id] into an invitation, so when another person signs up from >> the invitation, you can track who invited who. And that would make your >> friend in your dojo. I was using something like this before and eveything >> was working fine, but now it seems like it is not working anymore. Is >> anyone having similar problems? Is this something facebook does not allow >> anymore? >> > > I think this changed in recent versions of the platform. If you set up a > post authorize redirect URL, you can use the next parameter to keep > parameters. You can see how I do this in the screencasts on > http://www.pragprog.com. The code is in the facebooker_authentication > plugin on github. > > Mike > > >> >> Your feedback is very helpful. >> _______________________________________________ >> 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 marcdurden at gmail.com Thu Dec 4 16:43:18 2008 From: marcdurden at gmail.com (Marco Durden) Date: Thu, 4 Dec 2008 13:43:18 -0800 Subject: [Facebooker-talk] parameter passing before install lost after install??? In-Reply-To: <736B1288-CE95-4EE5-9F69-63E413C0F244@elevatedrails.com> References: <736B1288-CE95-4EE5-9F69-63E413C0F244@elevatedrails.com> Message-ID: Here was my fiter chain that was making my parameters disappear. ensure_application_is_installed_by_facebook_user :except => 'tab' before_filter :facebook_login_required, :except => "tab" Now if I reverse them: before_filter :facebook_login_required, :except => "tab" ensure_application_is_installed_by_facebook_user :except => 'tab' Things work are working again. Is there a reason for this? On Thu, Dec 4, 2008 at 6:28 AM, Mike Mangino wrote: > > On Dec 4, 2008, at 12:24 AM, Marco Durden wrote: > > I was wondering if anyone else is having problems with passing query >> string parameters upon install. For example, in the book Developing >> Facebook Platform Applications with Rails, the books example adds >> params[:from_id] into an invitation, so when another person signs up from >> the invitation, you can track who invited who. And that would make your >> friend in your dojo. I was using something like this before and eveything >> was working fine, but now it seems like it is not working anymore. Is >> anyone having similar problems? Is this something facebook does not allow >> anymore? >> > > I think this changed in recent versions of the platform. If you set up a > post authorize redirect URL, you can use the next parameter to keep > parameters. You can see how I do this in the screencasts on > http://www.pragprog.com. The code is in the facebooker_authentication > plugin on github. > > Mike > > >> >> Your feedback is very helpful. >> _______________________________________________ >> 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 dpnewman at gmail.com Thu Dec 4 20:30:18 2008 From: dpnewman at gmail.com (Dan Newman) Date: Thu, 4 Dec 2008 17:30:18 -0800 Subject: [Facebooker-talk] how to handle fbconnect -> creating user Message-ID: <9d3959b70812041730m166361f2l1a17602409854e6@mail.gmail.com> when using fbconnect, i am able to implement the login button. and it functions correctly seemingly, where it asks user to provide fb login creds and then refreshes and changes to a logout version of button. cool. i have an fb session, but it does not seem to have all info, such as session[:facebook_session].user (raises invalid parameter). debug of session in view shows: --- !ruby/object:Facebooker::Session session_key: uid: expires: secret_from_session: auth_token: a24b017b726cbe25c4c582e0cd72e976 api_key: 46089abc302250cbc396cc1759523031 secret_key: secret key here -- wondering where to go from here with facebooker to finish the auth process if anyone has an idea. -- web dev: www.polyrails.com artworks: www.danielnewman.info ph : 415-407-6239 :::::::::::::::::::::::::::::::::::::::::::::::::::::: -------------- next part -------------- An HTML attachment was scrubbed... URL: From josh.m.sharpe at gmail.com Fri Dec 5 13:27:16 2008 From: josh.m.sharpe at gmail.com (Josh Sharpe) Date: Fri, 5 Dec 2008 13:27:16 -0500 Subject: [Facebooker-talk] updating users status while not logged in Message-ID: <6a7129610812051027q5f0afb0cr7a490a0fa0318434@mail.gmail.com> If I prompt the user for both the "status_update" and "offline_access" permissions then I can just: user.facebooker_user.status="foo" and it works like a charm regardless if that user is logged in or not. Great. However, I notice that the Twitter app does NOT request the offline access permission and they are able to update a user's status anyways. Now http://wiki.developers.facebook.com/index.php/Users.setStatus says that only the "status_update" perm is required. So my guess is that the facebooker api is calling setStatus incorrectly by always trying to create the session with the session key instead of with the uid... or something like that. Think that's possible? -------------- next part -------------- An HTML attachment was scrubbed... URL: From josh.m.sharpe at gmail.com Fri Dec 5 13:31:01 2008 From: josh.m.sharpe at gmail.com (Josh Sharpe) Date: Fri, 5 Dec 2008 13:31:01 -0500 Subject: [Facebooker-talk] updating users status while not logged in In-Reply-To: <6a7129610812051027q5f0afb0cr7a490a0fa0318434@mail.gmail.com> References: <6a7129610812051027q5f0afb0cr7a490a0fa0318434@mail.gmail.com> Message-ID: <6a7129610812051031g5ebaf624o9cfb3751b3939b3b@mail.gmail.com> And to answer my own question... This works while I'm logged out of facebook. I'm pretty sure it doesn't even touch the session. session = Facebooker::Session.create(Globals::FACEBOOK_API_KEY,Globals::FACEBOOK_SECRET) session.post('facebook.users.setStatus',{:uid => User.find(4).facebook_id, :status => 'test'}) On Fri, Dec 5, 2008 at 1:27 PM, Josh Sharpe wrote: > If I prompt the user for both the "status_update" and "offline_access" > permissions then I can just: > > user.facebooker_user.status="foo" > > and it works like a charm regardless if that user is logged in or not. > Great. > > However, I notice that the Twitter app does NOT request the offline access > permission and they are able to update a user's status anyways. > > Now http://wiki.developers.facebook.com/index.php/Users.setStatus says > that only the "status_update" perm is required. So my guess is that the > facebooker api is calling setStatus incorrectly by always trying to create > the session with the session key instead of with the uid... or something > like that. > > Think that's possible? > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dpnewman at gmail.com Fri Dec 5 17:11:31 2008 From: dpnewman at gmail.com (Dan Newman) Date: Fri, 5 Dec 2008 14:11:31 -0800 Subject: [Facebooker-talk] how to check Facebooker::Session::SessionExpired Message-ID: <9d3959b70812051411i78470470k159c1ba7f7a8f380@mail.gmail.com> How can I check this and respond to? -- web dev: www.polyrails.com artworks: www.danielnewman.info ph : 415-407-6239 :::::::::::::::::::::::::::::::::::::::::::::::::::::: -------------- next part -------------- An HTML attachment was scrubbed... URL: From dpnewman at gmail.com Mon Dec 8 16:57:20 2008 From: dpnewman at gmail.com (Dan Newman) Date: Mon, 8 Dec 2008 13:57:20 -0800 Subject: [Facebooker-talk] support for iframe? Message-ID: <9d3959b70812081357u7d632ad7jc77e9d98eea46c0c@mail.gmail.com> i have seen posted in a couple of places .. "facebooker only supports the canvas" not iframe. is this true? -- web dev: www.polyrails.com artworks: www.danielnewman.info ph : 415-407-6239 :::::::::::::::::::::::::::::::::::::::::::::::::::::: -------------- next part -------------- An HTML attachment was scrubbed... URL: From mmangino at elevatedrails.com Mon Dec 8 17:05:03 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Mon, 8 Dec 2008 17:05:03 -0500 Subject: [Facebooker-talk] support for iframe? In-Reply-To: <9d3959b70812081357u7d632ad7jc77e9d98eea46c0c@mail.gmail.com> References: <9d3959b70812081357u7d632ad7jc77e9d98eea46c0c@mail.gmail.com> Message-ID: On Dec 8, 2008, at 4:57 PM, Dan Newman wrote: > i have seen posted in a couple of places .. "facebooker only > supports the canvas" not iframe. > > is this true? > I don't see why it would be. Has anyone given a reason why? Mike > > > -- > web dev: www.polyrails.com > artworks: www.danielnewman.info > ph : 415-407-6239 > :::::::::::::::::::::::::::::::::::::::::::::::::::::: > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk -- Mike Mangino http://www.elevatedrails.com From dpnewman at gmail.com Mon Dec 8 17:15:25 2008 From: dpnewman at gmail.com (Dan Newman) Date: Mon, 8 Dec 2008 14:15:25 -0800 Subject: [Facebooker-talk] support for iframe? In-Reply-To: References: <9d3959b70812081357u7d632ad7jc77e9d98eea46c0c@mail.gmail.com> Message-ID: <9d3959b70812081415m7228ea51m19bfdd29c78dc62d@mail.gmail.com> ok - good to know that this should not be the case. i was running searches on an error i get Facebooker::Session::IncorrectSignature. saw the iframe thing here: http://forum.developers.facebook.com/viewtopic.php?id=18778 On Mon, Dec 8, 2008 at 2:05 PM, Mike Mangino wrote: > > On Dec 8, 2008, at 4:57 PM, Dan Newman wrote: > > i have seen posted in a couple of places .. "facebooker only supports the >> canvas" not iframe. >> >> is this true? >> >> > I don't see why it would be. Has anyone given a reason why? > > Mike > > > >> >> -- >> web dev: www.polyrails.com >> artworks: www.danielnewman.info >> ph : 415-407-6239 >> :::::::::::::::::::::::::::::::::::::::::::::::::::::: >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/facebooker-talk >> > > -- > Mike Mangino > http://www.elevatedrails.com > > > > -- web dev: www.polyrails.com artworks: www.danielnewman.info ph : 415-407-6239 :::::::::::::::::::::::::::::::::::::::::::::::::::::: -------------- next part -------------- An HTML attachment was scrubbed... URL: From mjfreshyfresh at gmail.com Mon Dec 8 17:17:24 2008 From: mjfreshyfresh at gmail.com (Michael Jones) Date: Mon, 8 Dec 2008 14:17:24 -0800 Subject: [Facebooker-talk] support for iframe? In-Reply-To: <9d3959b70812081357u7d632ad7jc77e9d98eea46c0c@mail.gmail.com> References: <9d3959b70812081357u7d632ad7jc77e9d98eea46c0c@mail.gmail.com> Message-ID: <521D0782-F647-41CF-8636-AE5290796398@gmail.com> We Facebooker used it with an iFrame app and had to resolve a few issues. The first being if you're not authenticated rendering the correct login screen (instead of seeing facebook inside of facebook). I know there were a couple of other issues but I can't remember them off the top of my head. On Dec 8, 2008, at 1:57 PM, Dan Newman wrote: > i have seen posted in a couple of places .. "facebooker only > supports the canvas" not iframe. > > is this true? > > > > -- > web dev: www.polyrails.com > artworks: www.danielnewman.info > ph : 415-407-6239 > :::::::::::::::::::::::::::::::::::::::::::::::::::::: > _______________________________________________ > 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 dpnewman at gmail.com Mon Dec 8 17:23:29 2008 From: dpnewman at gmail.com (Dan Newman) Date: Mon, 8 Dec 2008 14:23:29 -0800 Subject: [Facebooker-talk] support for iframe? In-Reply-To: <521D0782-F647-41CF-8636-AE5290796398@gmail.com> References: <9d3959b70812081357u7d632ad7jc77e9d98eea46c0c@mail.gmail.com> <521D0782-F647-41CF-8636-AE5290796398@gmail.com> Message-ID: <9d3959b70812081423g71637969j5db0ef03454d131d@mail.gmail.com> my Facebooker::Session::IncorrectSignature error seems to come after i log out of facebook itself and then refresh my rails app. On Mon, Dec 8, 2008 at 2:17 PM, Michael Jones wrote: > We Facebooker used it with an iFrame app and had to resolve a few issues. > > The first being if you're not authenticated rendering the correct login > screen (instead of seeing facebook inside of facebook). I know there were a > couple of other issues but I can't remember them off the top of my head. > > > > > > > On Dec 8, 2008, at 1:57 PM, Dan Newman wrote: > > i have seen posted in a couple of places .. "facebooker only supports the > canvas" not iframe. > is this true? > > > > -- > web dev: www.polyrails.com > artworks: www.danielnewman.info > ph : 415-407-6239 > :::::::::::::::::::::::::::::::::::::::::::::::::::::: > _______________________________________________ > 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 > > -- web dev: www.polyrails.com artworks: www.danielnewman.info ph : 415-407-6239 :::::::::::::::::::::::::::::::::::::::::::::::::::::: -------------- next part -------------- An HTML attachment was scrubbed... URL: From mmangino at elevatedrails.com Mon Dec 8 17:30:14 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Mon, 8 Dec 2008 17:30:14 -0500 Subject: [Facebooker-talk] support for iframe? In-Reply-To: <9d3959b70812081415m7228ea51m19bfdd29c78dc62d@mail.gmail.com> References: <9d3959b70812081357u7d632ad7jc77e9d98eea46c0c@mail.gmail.com> <9d3959b70812081415m7228ea51m19bfdd29c78dc62d@mail.gmail.com> Message-ID: <8C810F32-AC18-4549-AE14-BD91470C345A@elevatedrails.com> Are you still getting that error? If so, can you send it including all of your params to the mailing list? Mike On Dec 8, 2008, at 5:15 PM, Dan Newman wrote: > ok - good to know that this should not be the case. > > i was running searches on an error i get > Facebooker::Session::IncorrectSignature. > saw the iframe thing here: http://forum.developers.facebook.com/viewtopic.php?id=18778 > > > > > > On Mon, Dec 8, 2008 at 2:05 PM, Mike Mangino > wrote: > > On Dec 8, 2008, at 4:57 PM, Dan Newman wrote: > > i have seen posted in a couple of places .. "facebooker only > supports the canvas" not iframe. > > is this true? > > > I don't see why it would be. Has anyone given a reason why? > > Mike > > > > > -- > web dev: www.polyrails.com > artworks: www.danielnewman.info > ph : 415-407-6239 > :::::::::::::::::::::::::::::::::::::::::::::::::::::: > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > > -- > Mike Mangino > http://www.elevatedrails.com > > > > > > > -- > web dev: www.polyrails.com > artworks: www.danielnewman.info > ph : 415-407-6239 > :::::::::::::::::::::::::::::::::::::::::::::::::::::: -- Mike Mangino http://www.elevatedrails.com From mmangino at elevatedrails.com Mon Dec 8 17:32:10 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Mon, 8 Dec 2008 17:32:10 -0500 Subject: [Facebooker-talk] support for iframe? In-Reply-To: <9d3959b70812081423g71637969j5db0ef03454d131d@mail.gmail.com> References: <9d3959b70812081357u7d632ad7jc77e9d98eea46c0c@mail.gmail.com> <521D0782-F647-41CF-8636-AE5290796398@gmail.com> <9d3959b70812081423g71637969j5db0ef03454d131d@mail.gmail.com> Message-ID: <8EB25FDC-2014-40F6-A4A0-0E114DAD2BA5@elevatedrails.com> Where is the application raised from? It sounds like you might want to catch that error and force a login. Mike On Dec 8, 2008, at 5:23 PM, Dan Newman wrote: > my Facebooker::Session::IncorrectSignature error seems to come after > i log out of facebook itself and then refresh my rails app. > > > On Mon, Dec 8, 2008 at 2:17 PM, Michael Jones > wrote: > We Facebooker used it with an iFrame app and had to resolve a few > issues. > > The first being if you're not authenticated rendering the correct > login screen (instead of seeing facebook inside of facebook). I know > there were a couple of other issues but I can't remember them off > the top of my head. > > > > > > > On Dec 8, 2008, at 1:57 PM, Dan Newman wrote: > >> i have seen posted in a couple of places .. "facebooker only >> supports the canvas" not iframe. >> >> is this true? >> >> >> >> -- >> web dev: www.polyrails.com >> artworks: www.danielnewman.info >> ph : 415-407-6239 >> :::::::::::::::::::::::::::::::::::::::::::::::::::::: >> _______________________________________________ >> 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 > > > > > -- > web dev: www.polyrails.com > artworks: www.danielnewman.info > ph : 415-407-6239 > :::::::::::::::::::::::::::::::::::::::::::::::::::::: > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk -- Mike Mangino http://www.elevatedrails.com From dpnewman at gmail.com Mon Dec 8 17:32:16 2008 From: dpnewman at gmail.com (Dan Newman) Date: Mon, 8 Dec 2008 14:32:16 -0800 Subject: [Facebooker-talk] support for iframe? In-Reply-To: <8C810F32-AC18-4549-AE14-BD91470C345A@elevatedrails.com> References: <9d3959b70812081357u7d632ad7jc77e9d98eea46c0c@mail.gmail.com> <9d3959b70812081415m7228ea51m19bfdd29c78dc62d@mail.gmail.com> <8C810F32-AC18-4549-AE14-BD91470C345A@elevatedrails.com> Message-ID: <9d3959b70812081432k2fcf27eam758de93769e9fcd7@mail.gmail.com> yeah ...here t'is: ---------------------- Processing FbController#index (for 127.0.0.1 at 2008-12-08 14:32:00) [GET] Session ID: BAh7BzoVZmFjZWJvb2tfc2Vzc2lvblU6GEZhY2Vib29rZXI6OlNlc3Npb25b DCI6Mi5RQ195NDh5WnpwenM4Y2VUWlJJWl9RX18uODY0MDAuMTIyODg0OTIw MC01OTM1MTQ2MjNpBH9QYCNsKwcwwD5JMCIlMzM5OGFjZjljNjRjZDBkNTBl N2E3NDZmYzkyZDc1OTYiJWQ3ZjcyMjQ1NWVjMzA0MzQzNTQ2NGVhNmE5ZWNl MGJmIiVmZDVjYTNmMjA3YWY0Y2U0YzYyZWQ1MjExNzI5NTRkZiIKZmxhc2hJ QzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNoSGFzaHsABjoKQHVz ZWR7AA==--5172d2f0f7c742d0b8d56b927a5c68750f70d11d Parameters: {"action"=>"index", "controller"=>"fb"} Facebooker::Session::IncorrectSignature (Facebooker::Session::IncorrectSignature): /vendor/plugins/facebooker/lib/facebooker/rails/controller.rb:144:in `verify_signature' /vendor/plugins/facebooker/lib/facebooker/rails/controller.rb:129:in `verified_facebook_params' /vendor/plugins/facebooker/lib/facebooker/rails/controller.rb:36:in `facebook_params' /vendor/plugins/facebooker/lib/facebooker/rails/controller.rb:187:in `application_is_installed?' /vendor/plugins/facebooker/lib/facebooker/rails/controller.rb:214:in `ensure_application_is_installed_by_facebook_user' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/callbacks.rb:173:in `send' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/callbacks.rb:173:in `evaluate_method' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/callbacks.rb:161:in `call' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/filters.rb:191:in `call' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/filters.rb:591:in `run_before_filters' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/filters.rb:577:in `call_filters' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/filters.rb:572:in `perform_action_without_benchmark' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue' /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/rescue.rb:201:in `perform_action_without_caching' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/caching/sql_cache.rb:13:in `perform_action' /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/connection_adapters/abstract/query_cache.rb:33:in `cache' /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/query_cache.rb:8:in `cache' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/caching/sql_cache.rb:12:in `perform_action' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/base.rb:529:in `send' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/base.rb:529:in `process_without_filters' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/filters.rb:568:in `process_without_session_management_support' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/session_management.rb:130:in `process' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/base.rb:389:in `process' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/dispatcher.rb:149:in `handle_request' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/dispatcher.rb:107:in `dispatch' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/dispatcher.rb:104:in `synchronize' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/dispatcher.rb:104:in `dispatch' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/dispatcher.rb:120:in `dispatch_cgi' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/dispatcher.rb:35:in `dispatch' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:76:in `process' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:74:in `synchronize' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:74:in `process' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:159:in `process_client' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in `each' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in `process_client' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `initialize' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `new' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `initialize' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `new' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:282:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:281:in `each' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:281:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:128:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/command.rb:212:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:281 /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/dependencies.rb:503:in `load' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/dependencies.rb:503:in `load' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/dependencies.rb:355:in `new_constants_in' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/dependencies.rb:503:in `load' /usr/local/lib/ruby/gems/1.8/gems/rails-2.1.1/lib/commands/servers/mongrel.rb:64 /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/dependencies.rb:510:in `require' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/dependencies.rb:355:in `new_constants_in' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/dependencies.rb:510:in `require' /usr/local/lib/ruby/gems/1.8/gems/rails-2.1.1/lib/commands/server.rb:39 /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' ./script/server:3 Rendering /Users/danielnewman/ror/fbconnect_ror/vendor/plugins/facebooker/templates/layout.erb (200) -------------- next part -------------- An HTML attachment was scrubbed... URL: From pierre at tiiptop.com Tue Dec 9 06:47:45 2008 From: pierre at tiiptop.com (Pierre Valade) Date: Tue, 9 Dec 2008 12:47:45 +0100 Subject: [Facebooker-talk] Use images parameter in Feed.publishUserAction Message-ID: <5af28ee50812090347y511e96bl88928cd4ee472c84@mail.gmail.com> Hello, First of all, thanks for everyone who made Facebooker, it's really great. (mmangino especially) Is there any possibily to include the images parameter in the Feed.publishUserAction ? flash, mp3, video and comments_xid don't seem to be included. I would to be sure before submitting a patch. Thanks Pierre -------------- next part -------------- An HTML attachment was scrubbed... URL: From pierre at tiiptop.com Tue Dec 9 07:03:13 2008 From: pierre at tiiptop.com (Pierre Valade) Date: Tue, 9 Dec 2008 13:03:13 +0100 Subject: [Facebooker-talk] Use images parameter in Feed.publishUserAction In-Reply-To: <5af28ee50812090347y511e96bl88928cd4ee472c84@mail.gmail.com> References: <5af28ee50812090347y511e96bl88928cd4ee472c84@mail.gmail.com> Message-ID: <5af28ee50812090403g494b9e8cjbb401e753b54067d@mail.gmail.com> Oups... sorry I have just realized that I misunderstood the Feed.publishAction documentation. You can use images in your feed using data :images => [image('http://www.google.fr/intl/fr_fr/images/logo.gif', ' http://www.google.fr')] in the publisher :) Pierre On Tue, Dec 9, 2008 at 12:47 PM, Pierre Valade wrote: > Hello, > First of all, thanks for everyone who made Facebooker, it's really great. > (mmangino especially) > > Is there any possibily to include the images parameter in the > Feed.publishUserAction ? > > flash, mp3, video and comments_xid don't seem to be included. > > I would to be sure before submitting a patch. > > Thanks > > Pierre > -- Pierre Valade +33.6.89.04.15.30 www.tiiptop.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From pierre at tiiptop.com Tue Dec 9 08:09:17 2008 From: pierre at tiiptop.com (Pierre Valade) Date: Tue, 9 Dec 2008 14:09:17 +0100 Subject: [Facebooker-talk] Users.hasAppPermission Message-ID: <5af28ee50812090509i1b2774dch4db7a89da4dca475@mail.gmail.com> Hello, Is there any way of retrieving the value of Users.hasAppPermission using facebooker ? Thank you very much, Pierre -------------- next part -------------- An HTML attachment was scrubbed... URL: From josh.m.sharpe at gmail.com Tue Dec 9 11:09:26 2008 From: josh.m.sharpe at gmail.com (Josh Sharpe) Date: Tue, 9 Dec 2008 11:09:26 -0500 Subject: [Facebooker-talk] Users.hasAppPermission In-Reply-To: <5af28ee50812090509i1b2774dch4db7a89da4dca475@mail.gmail.com> References: <5af28ee50812090509i1b2774dch4db7a89da4dca475@mail.gmail.com> Message-ID: <6a7129610812090809g573dfbc7wc5c2a5bd8f02ebd9@mail.gmail.com> If you don't have the user's active session key you have to go through your app's session: class Facebook def self.has_permission?(uid,perm) Facebooker::Session.create(API_KEY,SECRET).post('facebook.users.hasAppPermission', :ext_perm => perm, :uid => uid) end end I hacked Facebooker::User in my local repo to support hasAppPermission. But even after adding it I don't use it simply because it requires an active user session_key which you may or may not have. The above method works with just the user's uid. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mmangino at elevatedrails.com Tue Dec 9 11:33:04 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Tue, 9 Dec 2008 11:33:04 -0500 Subject: [Facebooker-talk] Users.hasAppPermission In-Reply-To: <6a7129610812090809g573dfbc7wc5c2a5bd8f02ebd9@mail.gmail.com> References: <5af28ee50812090509i1b2774dch4db7a89da4dca475@mail.gmail.com> <6a7129610812090809g573dfbc7wc5c2a5bd8f02ebd9@mail.gmail.com> Message-ID: Session#post takes an additional argument for whether or not to include the session key. If a session key isn't required, you can do: Facebooker ::Session .create(API_KEY,SECRET).post('facebook.users.hasAppPermission', {:ext_perm => perm, :uid => uid},false) and we won't generate them. If you've added this to a github fork, send me a pull request for the change and I'll pull it in! Mike On Dec 9, 2008, at 11:09 AM, Josh Sharpe wrote: > If you don't have the user's active session key you have to go > through your app's session: > > class Facebook > def self.has_permission?(uid,perm) > > Facebooker > ::Session > .create > (API_KEY,SECRET).post('facebook.users.hasAppPermission', :ext_perm > => perm, :uid => uid) > end > end > > I hacked Facebooker::User in my local repo to support > hasAppPermission. But even after adding it I don't use it simply > because it requires an active user session_key which you may or may > not have. The above method works with just the user's uid. > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk -- Mike Mangino http://www.elevatedrails.com From pierre at tiiptop.com Tue Dec 9 12:19:12 2008 From: pierre at tiiptop.com (Pierre Valade) Date: Tue, 9 Dec 2008 18:19:12 +0100 Subject: [Facebooker-talk] Register template Message-ID: <5af28ee50812090919u468ca462l449145cfc86eb5ef@mail.gmail.com> Hello, I use very often in my first Connect app the function that register template (FooPublisher.register_boo) " # # Before using, you must register your template by calling register. For this example # # You would call TestPublisher.register_publish_action" (for the doc) But I ended up with a lot of registered templates for my application. (F.B limit is 100) I have seen for the code source that a hash is calculated from the stories templates and allow you to simply call create or deliver without having to worry about registering the template I just mention the issue here because the doc is not quite clear about this wonderful feature ! Thanks, Pierre -------------- next part -------------- An HTML attachment was scrubbed... URL: From pierre at tiiptop.com Tue Dec 9 12:01:08 2008 From: pierre at tiiptop.com (Pierre Valade) Date: Tue, 9 Dec 2008 18:01:08 +0100 Subject: [Facebooker-talk] Users.hasAppPermission In-Reply-To: References: <5af28ee50812090509i1b2774dch4db7a89da4dca475@mail.gmail.com> <6a7129610812090809g573dfbc7wc5c2a5bd8f02ebd9@mail.gmail.com> Message-ID: <5af28ee50812090901qb63d8a7md7ff232581bd4018@mail.gmail.com> Thank you very much for your answer. I will look on the net how to make a github fork and i will get back to you On Tue, Dec 9, 2008 at 5:33 PM, Mike Mangino wrote: > Session#post takes an additional argument for whether or not to include the > session key. If a session key isn't required, you can do: > > Facebooker::Session.create(API_KEY,SECRET).post('facebook.users.hasAppPermission', > {:ext_perm => perm, :uid => uid},false) > > and we won't generate them. > > If you've added this to a github fork, send me a pull request for the > change and I'll pull it in! > > Mike > > > On Dec 9, 2008, at 11:09 AM, Josh Sharpe wrote: > > If you don't have the user's active session key you have to go through >> your app's session: >> >> class Facebook >> def self.has_permission?(uid,perm) >> >> Facebooker::Session.create(API_KEY,SECRET).post('facebook.users.hasAppPermission', >> :ext_perm => perm, :uid => uid) >> end >> end >> >> I hacked Facebooker::User in my local repo to support hasAppPermission. >> But even after adding it I don't use it simply because it requires an active >> user session_key which you may or may not have. The above method works with >> just the user's uid. >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/facebooker-talk >> > > -- > Mike Mangino > http://www.elevatedrails.com > > > > -- Pierre Valade +33.6.89.04.15.30 www.tiiptop.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephane.akkaoui at imeuble.info Tue Dec 9 12:36:18 2008 From: stephane.akkaoui at imeuble.info (=?ISO-8859-1?Q?St=E9phane_Akkaoui?=) Date: Tue, 9 Dec 2008 18:36:18 +0100 Subject: [Facebooker-talk] Register template In-Reply-To: <5af28ee50812090919u468ca462l449145cfc86eb5ef@mail.gmail.com> References: <5af28ee50812090919u468ca462l449145cfc86eb5ef@mail.gmail.com> Message-ID: <73C94AE6-C3A1-4E8F-8B58-5A6CECA10866@imeuble.info> After registering a template, Facebooker save the template id returned by facebook with the template name (the methode name you defined in the publisher). To avoid multiple template registering, I do something like : FacebookPublisher.register_feed_item unless Facebooker ::Rails::Publisher::FacebookTemplate.find_by_template_name("feed_item") HTH, -- St?phane Akkaoui http://imeuble.info [fr] http://sociabliz.com [en/fr] Le 9 d?c. 08 ? 18:19, Pierre Valade a ?crit : > Hello, > > I use very often in my first Connect app the function that register > template (FooPublisher.register_boo) > > " # # Before using, you must register your template by > calling register. For this example > # # You would call > TestPublisher.register_publish_action" (for the doc) > > But I ended up with a lot of registered templates for my > application. (F.B limit is 100) > > I have seen for the code source that a hash is calculated from the > stories templates and allow you to simply call create or deliver > without having to worry about registering the template > > I just mention the issue here because the doc is not quite clear > about this wonderful feature ! > > Thanks, > > Pierre > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk From pierre at tiiptop.com Tue Dec 9 12:46:05 2008 From: pierre at tiiptop.com (Pierre Valade) Date: Tue, 9 Dec 2008 18:46:05 +0100 Subject: [Facebooker-talk] Register template In-Reply-To: <73C94AE6-C3A1-4E8F-8B58-5A6CECA10866@imeuble.info> References: <5af28ee50812090919u468ca462l449145cfc86eb5ef@mail.gmail.com> <73C94AE6-C3A1-4E8F-8B58-5A6CECA10866@imeuble.info> Message-ID: <5af28ee50812090946j2cfc6052p737114078fd72dd7@mail.gmail.com> Yes but the last version of facebooker from Github does even a better job by registering the template only when needed (when the hash has changed. So calling register_.. is not necessary unless you change something that is not included in the hash's calculation .... For example be aware that action_links are not included in the hash : def hashed_content(klass, method) publisher = setup_publisher(klass,method) Digest::MD5.hexdigest [publisher.one_line_story_templates, publisher.short_story_templates, publisher.full_story_template].to_json end Pierre On Tue, Dec 9, 2008 at 6:36 PM, St?phane Akkaoui < stephane.akkaoui at imeuble.info> wrote: > After registering a template, Facebooker save the template id returned by > facebook with the template name (the methode name you defined in the > publisher). > To avoid multiple template registering, I do something like : > > FacebookPublisher.register_feed_item unless > Facebooker::Rails::Publisher::FacebookTemplate.find_by_template_name("feed_item") > > HTH, > > -- > St?phane Akkaoui > http://imeuble.info [fr] > http://sociabliz.com [en/fr] > > Le 9 d?c. 08 ? 18:19, Pierre Valade a ?crit : > > Hello, >> >> I use very often in my first Connect app the function that register >> template (FooPublisher.register_boo) >> >> " # # Before using, you must register your template by calling >> register. For this example >> # # You would call TestPublisher.register_publish_action" (for the >> doc) >> >> But I ended up with a lot of registered templates for my application. (F.B >> limit is 100) >> >> I have seen for the code source that a hash is calculated from the stories >> templates and allow you to simply call create or deliver without having to >> worry about registering the template >> >> I just mention the issue here because the doc is not quite clear about >> this wonderful feature ! >> >> Thanks, >> >> Pierre >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/facebooker-talk >> > > -- Pierre Valade +33.6.89.04.15.30 www.tiiptop.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From george at xapblog.com Tue Dec 9 18:34:14 2008 From: george at xapblog.com (George Deglin) Date: Tue, 9 Dec 2008 15:34:14 -0800 Subject: [Facebooker-talk] Rspec response.body is blank Message-ID: I'm attempting to write a test that verifies that the response body has expected data within it. The following works fine: response.should render_template('index') response.should be_success However: response.should have_tag("div") fails For some reason the value of response.body is " " (A string containing a single space) Does anyone have any thoughts on what the problem might be here? -------------- next part -------------- An HTML attachment was scrubbed... URL: From mmangino at elevatedrails.com Tue Dec 9 18:42:21 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Tue, 9 Dec 2008 18:42:21 -0500 Subject: [Facebooker-talk] Rspec response.body is blank In-Reply-To: References: Message-ID: <0E7BC78C-39B3-49E6-8369-1AFFE2C20590@elevatedrails.com> Are you integrating your views? Rspec doesn't render views by default. Instead, you can use a view spec for that. Mike On Dec 9, 2008, at 6:34 PM, George Deglin wrote: > I'm attempting to write a test that verifies that the response body > has expected data within it. > > The following works fine: > response.should render_template('index') > response.should be_success > > However: > response.should have_tag("div") fails > > For some reason the value of response.body is " " (A string > containing a single space) > > Does anyone have any thoughts on what the problem might be here? > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk -- Mike Mangino http://www.elevatedrails.com From george at xapblog.com Tue Dec 9 18:48:19 2008 From: george at xapblog.com (George Deglin) Date: Tue, 9 Dec 2008 15:48:19 -0800 Subject: [Facebooker-talk] Rspec response.body is blank In-Reply-To: <0E7BC78C-39B3-49E6-8369-1AFFE2C20590@elevatedrails.com> References: <0E7BC78C-39B3-49E6-8369-1AFFE2C20590@elevatedrails.com> Message-ID: Yeah. I just realized that myself. I'd like to be able to just make sure that the view renders successfully (No erb statements inside of the view fail). It would be nice to be able to test that inside of a controller spec if that's possible. On Tue, Dec 9, 2008 at 3:42 PM, Mike Mangino wrote: > Are you integrating your views? Rspec doesn't render views by default. > Instead, you can use a view spec for that. > > Mike > > > On Dec 9, 2008, at 6:34 PM, George Deglin wrote: > > I'm attempting to write a test that verifies that the response body has >> expected data within it. >> >> The following works fine: >> response.should render_template('index') >> response.should be_success >> >> However: >> response.should have_tag("div") fails >> >> For some reason the value of response.body is " " (A string containing a >> single space) >> >> Does anyone have any thoughts on what the problem might be here? >> _______________________________________________ >> 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 george at xapblog.com Tue Dec 9 19:05:48 2008 From: george at xapblog.com (George Deglin) Date: Tue, 9 Dec 2008 16:05:48 -0800 Subject: [Facebooker-talk] Rspec response.body is blank In-Reply-To: References: <0E7BC78C-39B3-49E6-8369-1AFFE2C20590@elevatedrails.com> Message-ID: Looks like using the integrate_views method was indeed what I was seeking to use. Thanks. George On Tue, Dec 9, 2008 at 3:48 PM, George Deglin wrote: > Yeah. I just realized that myself. I'd like to be able to just make sure > that the view renders successfully (No erb statements inside of the view > fail). It would be nice to be able to test that inside of a controller spec > if that's possible. > > > On Tue, Dec 9, 2008 at 3:42 PM, Mike Mangino wrote: > >> Are you integrating your views? Rspec doesn't render views by default. >> Instead, you can use a view spec for that. >> >> Mike >> >> >> On Dec 9, 2008, at 6:34 PM, George Deglin wrote: >> >> I'm attempting to write a test that verifies that the response body has >>> expected data within it. >>> >>> The following works fine: >>> response.should render_template('index') >>> response.should be_success >>> >>> However: >>> response.should have_tag("div") fails >>> >>> For some reason the value of response.body is " " (A string containing a >>> single space) >>> >>> Does anyone have any thoughts on what the problem might be here? >>> _______________________________________________ >>> 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 josh.m.sharpe at gmail.com Tue Dec 9 22:17:18 2008 From: josh.m.sharpe at gmail.com (Josh Sharpe) Date: Tue, 9 Dec 2008 22:17:18 -0500 Subject: [Facebooker-talk] events start time broken? Message-ID: <6a7129610812091917g74ec0bffpde217b5b783a90bb@mail.gmail.com> >> pp u.facebooker_user.events.size 60 => nil >> u.facebooker_user.events(:start_time => Time.now.utc.to_i).size => 60 I only have 3 events in the future..... >> u.facebooker_user.events.select{|e| e.start_time.to_i > Time.now.utc.to_i}.size => 3 Ah and there they are. -------------- next part -------------- An HTML attachment was scrubbed... URL: From josh.m.sharpe at gmail.com Tue Dec 9 22:33:03 2008 From: josh.m.sharpe at gmail.com (Josh Sharpe) Date: Tue, 9 Dec 2008 22:33:03 -0500 Subject: [Facebooker-talk] events start time broken? In-Reply-To: <6a7129610812091917g74ec0bffpde217b5b783a90bb@mail.gmail.com> References: <6a7129610812091917g74ec0bffpde217b5b783a90bb@mail.gmail.com> Message-ID: <6a7129610812091933u58d51226n7721dcf3f826a735@mail.gmail.com> dug around a bit... def events(params={}) @events ||= @session.post('facebook.events.get', {:uid => self.id}.merge(params)).map do |event| Event.from_hash(event) end end So this looks like it's trying to cache the results, but: a) If you drop the "@events ||=" then this problem is fixed and b) why would you want to cache the results? I mean, if the params change and its cached then you get back bunk data. That's my 2 cents.... Am I missing something? Anyone elses' input? -------------- next part -------------- An HTML attachment was scrubbed... URL: From george at xapblog.com Tue Dec 9 22:45:09 2008 From: george at xapblog.com (George Deglin) Date: Tue, 9 Dec 2008 19:45:09 -0800 Subject: [Facebooker-talk] events start time broken? In-Reply-To: <6a7129610812091933u58d51226n7721dcf3f826a735@mail.gmail.com> References: <6a7129610812091917g74ec0bffpde217b5b783a90bb@mail.gmail.com> <6a7129610812091933u58d51226n7721dcf3f826a735@mail.gmail.com> Message-ID: Yeah I had the same problem. The fix was simply using @events[params] ||= instead of @events ||=. There are a couple other places where the same fix might be needed. I have a patch written but I still need to finish writing specs for it. George On Tue, Dec 9, 2008 at 7:33 PM, Josh Sharpe wrote: > dug around a bit... > > def events(params={}) > @events ||= @session.post('facebook.events.get', {:uid => self.id}.merge(params)).map > do |event| > Event.from_hash(event) > end > end > > So this looks like it's trying to cache the results, but: > > a) If you drop the "@events ||=" then this problem is fixed and > b) why would you want to cache the results? > > I mean, if the params change and its cached then you get back bunk data. > > That's my 2 cents.... Am I missing something? Anyone elses' input? > > _______________________________________________ > 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 josh.m.sharpe at gmail.com Tue Dec 9 22:49:32 2008 From: josh.m.sharpe at gmail.com (Josh Sharpe) Date: Tue, 9 Dec 2008 22:49:32 -0500 Subject: [Facebooker-talk] events start time broken? In-Reply-To: References: <6a7129610812091917g74ec0bffpde217b5b783a90bb@mail.gmail.com> <6a7129610812091933u58d51226n7721dcf3f826a735@mail.gmail.com> Message-ID: <6a7129610812091949u481bab85o8dc434bd914ee781@mail.gmail.com> But what happens if you change params, is the result updated accordingly or is the first request cached? On Tue, Dec 9, 2008 at 10:45 PM, George Deglin wrote: > Yeah I had the same problem. The fix was simply using @events[params] ||= > instead of @events ||=. There are a couple other places where the same fix > might be needed. > > I have a patch written but I still need to finish writing specs for it. > > George > > On Tue, Dec 9, 2008 at 7:33 PM, Josh Sharpe wrote: > >> dug around a bit... >> >> def events(params={}) >> @events ||= @session.post('facebook.events.get', {:uid => self.id}.merge(params)).map >> do |event| >> Event.from_hash(event) >> end >> end >> >> So this looks like it's trying to cache the results, but: >> >> a) If you drop the "@events ||=" then this problem is fixed and >> b) why would you want to cache the results? >> >> I mean, if the params change and its cached then you get back bunk data. >> >> That's my 2 cents.... Am I missing something? Anyone elses' input? >> >> _______________________________________________ >> 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 george at xapblog.com Tue Dec 9 23:06:44 2008 From: george at xapblog.com (George Deglin) Date: Tue, 9 Dec 2008 20:06:44 -0800 Subject: [Facebooker-talk] events start time broken? In-Reply-To: <6a7129610812091949u481bab85o8dc434bd914ee781@mail.gmail.com> References: <6a7129610812091917g74ec0bffpde217b5b783a90bb@mail.gmail.com> <6a7129610812091933u58d51226n7721dcf3f826a735@mail.gmail.com> <6a7129610812091949u481bab85o8dc434bd914ee781@mail.gmail.com> Message-ID: The correct fix is actually def events(params={}) @events ||= {} @events[params] ||= @session.post('facebook.events.get', {:uid => self.id}.merge(params)).map do |event| Event.from_hash(event) end end If you call it a second time with different params it will return a new set of results. Previous results will still be cached. If the params are changed then the new results will be fetched. (But both old and new will still be cached). On Tue, Dec 9, 2008 at 7:49 PM, Josh Sharpe wrote: > But what happens if you change params, is the result updated accordingly or > is the first request cached? > > > On Tue, Dec 9, 2008 at 10:45 PM, George Deglin wrote: > >> Yeah I had the same problem. The fix was simply using @events[params] ||= >> instead of @events ||=. There are a couple other places where the same fix >> might be needed. >> >> I have a patch written but I still need to finish writing specs for it. >> >> George >> >> On Tue, Dec 9, 2008 at 7:33 PM, Josh Sharpe wrote: >> >>> dug around a bit... >>> >>> def events(params={}) >>> @events ||= @session.post('facebook.events.get', {:uid => self.id}.merge(params)).map >>> do |event| >>> Event.from_hash(event) >>> end >>> end >>> >>> So this looks like it's trying to cache the results, but: >>> >>> a) If you drop the "@events ||=" then this problem is fixed and >>> b) why would you want to cache the results? >>> >>> I mean, if the params change and its cached then you get back bunk data. >>> >>> That's my 2 cents.... Am I missing something? Anyone elses' input? >>> >>> _______________________________________________ >>> 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 josh.m.sharpe at gmail.com Tue Dec 9 23:15:26 2008 From: josh.m.sharpe at gmail.com (Josh Sharpe) Date: Tue, 9 Dec 2008 23:15:26 -0500 Subject: [Facebooker-talk] events.members & attendence.user methods Message-ID: <6a7129610812092015y5427e027q6b7ed4f3b7653ff4@mail.gmail.com> I had some thoughts about creating a Events#members method. It would be pretty straight forward if a session attribute existed on the event, but thats' not the case. I'm not sure that this is the best way to hack this out, but here goes: So the diff on Session is to merge the session object onto the new event in Session#events def events(options = {}) @events ||= post('facebook.events.get', options) do |response| response.map do |hash| Event.from_hash(hash.merge(:session => self)) end end end Then the Events#members method is pretty straight forward: def members @members ||= @session.event_members(@eid) end This works...can do stuff like: facebooker_user.events.first.members The only problem is that it slams that session instance on every Event. Is that necessarily a bad thing? Anyways, Attendence#user works basically the same way: class Session def event_members(eid) @members ||= post('facebook.events.getMembers', :eid => eid) do |response| response.map do |attendee_hash| Event::Attendance.from_hash(attendee_hash.merge(:session => self)) end end end end class Attendence def user @user ||= User.new(uid, @session) end end Is anyone doing this similarly, differently? Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: From lee at crossbonesystems.com Wed Dec 10 06:50:56 2008 From: lee at crossbonesystems.com (Lee Mallabone) Date: Wed, 10 Dec 2008 11:50:56 +0000 Subject: [Facebooker-talk] forms and IncorrectSignature (with test) In-Reply-To: References: Message-ID: Hi, I'm trying to get a form to work on a facebook canvas page with method="get". As I understand it, this should be possible. However, every time I change my (perfectly working) form a POST form to a GET form, I get the Facebooker::Session::IncorrectSignature exception raised. I've created a trivial test app that demonstrates this behaviour outside of my app. It can be downloaded from: http://www.crossbonesystems.com/wp-content/uploads/2008/12/fbformhelp1.zip Just drop in any working facebooker.yml in the config directory and the latest facebooker plugin (from github) into vendor/plugin and navigate to: http://apps.facebook.com/YOURAPP/runme/test You should see a simple page with two forms: one is a POST form (that works), the other is a GET form (that throws the above). They use the standard form_for helper (not the facebook_form_for). Can anyone verify my results? Am I missing a step in my form generation or is this a bug in facebooker? Mike, any pointers on how I can help fix this? Thanks, Lee. -- Lee Mallabone. Crossbone Systems Ltd. http://www.crossbonesystems.com/ http://www.fonicmonkey.net/ http://CambridgeWebHeads.ning.com/ -- Lee Mallabone. Crossbone Systems Ltd. http://www.crossbonesystems.com/ http://www.fonicmonkey.net/ http://CambridgeWebHeads.ning.com/ -- Lee Mallabone. Crossbone Systems Ltd. http://www.crossbonesystems.com/ http://www.fonicmonkey.net/ http://CambridgeWebHeads.ning.com/ From mmangino at elevatedrails.com Wed Dec 10 09:26:37 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Wed, 10 Dec 2008 09:26:37 -0500 Subject: [Facebooker-talk] forms and IncorrectSignature (with test) In-Reply-To: References: Message-ID: We've had reports of this before, I just haven't spent any time looking at it. I don't know that anyone else has either. I'll try to look at it this week. Mike On Dec 10, 2008, at 6:50 AM, Lee Mallabone wrote: > Hi, > > I'm trying to get a form to work on a facebook canvas page with > method="get". > > As I understand it, this should be possible. However, every time I > change my (perfectly working) form a POST form to a GET form, I get > the Facebooker::Session::IncorrectSignature exception raised. > > I've created a trivial test app that demonstrates this behaviour > outside of my app. It can be downloaded from: > http://www.crossbonesystems.com/wp-content/uploads/2008/12/fbformhelp1.zip > > Just drop in any working facebooker.yml in the config directory and > the latest facebooker plugin (from github) into vendor/plugin and > navigate to: > > http://apps.facebook.com/YOURAPP/runme/test > > You should see a simple page with two forms: one is a POST form (that > works), the other is a GET form (that throws the above). They use the > standard form_for helper (not the facebook_form_for). > > Can anyone verify my results? Am I missing a step in my form > generation or is this a bug in facebooker? Mike, any pointers on how I > can help fix this? > > Thanks, > Lee. > > > -- > Lee Mallabone. > Crossbone Systems Ltd. > > http://www.crossbonesystems.com/ > http://www.fonicmonkey.net/ > http://CambridgeWebHeads.ning.com/ > > > > -- > Lee Mallabone. > Crossbone Systems Ltd. > > http://www.crossbonesystems.com/ > http://www.fonicmonkey.net/ > http://CambridgeWebHeads.ning.com/ > > > > -- > Lee Mallabone. > 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 mmangino at elevatedrails.com Wed Dec 10 15:06:58 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Wed, 10 Dec 2008 15:06:58 -0500 Subject: [Facebooker-talk] forms and IncorrectSignature (with test) In-Reply-To: References: Message-ID: Lee, thanks for the test application. It appears that this is actually a Facebook bug. http://bugs.developers.facebook.com/show_bug.cgi?id=544 Luckily, we can work around it. The newest version of Facebooker monkey patches Rails to remove facebook parameters from the get parameters. It only does this if there are post parameters, so you can still stick the Facebook parameters in a request to an IFrame to make the IFrame share a session with your Facebook request. Mike On Dec 10, 2008, at 6:50 AM, Lee Mallabone wrote: > Hi, > > I'm trying to get a form to work on a facebook canvas page with > method="get". > > As I understand it, this should be possible. However, every time I > change my (perfectly working) form a POST form to a GET form, I get > the Facebooker::Session::IncorrectSignature exception raised. > > I've created a trivial test app that demonstrates this behaviour > outside of my app. It can be downloaded from: > http://www.crossbonesystems.com/wp-content/uploads/2008/12/fbformhelp1.zip > > Just drop in any working facebooker.yml in the config directory and > the latest facebooker plugin (from github) into vendor/plugin and > navigate to: > > http://apps.facebook.com/YOURAPP/runme/test > > You should see a simple page with two forms: one is a POST form (that > works), the other is a GET form (that throws the above). They use the > standard form_for helper (not the facebook_form_for). > > Can anyone verify my results? Am I missing a step in my form > generation or is this a bug in facebooker? Mike, any pointers on how I > can help fix this? > > Thanks, > Lee. > > > -- > Lee Mallabone. > Crossbone Systems Ltd. > > http://www.crossbonesystems.com/ > http://www.fonicmonkey.net/ > http://CambridgeWebHeads.ning.com/ > > > > -- > Lee Mallabone. > Crossbone Systems Ltd. > > http://www.crossbonesystems.com/ > http://www.fonicmonkey.net/ > http://CambridgeWebHeads.ning.com/ > > > > -- > Lee Mallabone. > 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 josh.m.sharpe at gmail.com Wed Dec 10 18:50:51 2008 From: josh.m.sharpe at gmail.com (Josh Sharpe) Date: Wed, 10 Dec 2008 18:50:51 -0500 Subject: [Facebooker-talk] friends.select bug? Message-ID: <6a7129610812101550n3cb1c99dvef20788791a3db10@mail.gmail.com> What is going on here... I thought this was some mod I made to the plugin, so I cloned a fresh copy off of git hub and still got the same results. >> u = User.find(4).facebooker_user => # >> friends = u.friends . . . >> friends.size => 118 >> friends.select{|f| f.first_name == "Sami"} Facebooker::Session::ExtendedPermissionRequired: Updating status requires the extended permission status_update from /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/parser.rb:481:in `process' from /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/parser.rb:15:in `parse' from /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/service.rb:14:in `post' from /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/session.rb:480:in `post_without_logging' from /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/session.rb:491:in `post' from /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/logging.rb:27:in `log_fb_api' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/core_ext/benchmark.rb:8:in `realtime' from /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/logging.rb:27:in `log_fb_api' from /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/session.rb:490:in `post' from /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/models/user.rb:230:in `status=' from /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/model.rb:114:in `__send__' from /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/model.rb:114:in `populate_from_hash!' from /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/model.rb:111:in `each' from /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/model.rb:111:in `populate_from_hash!' from /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/models/user.rb:113:in `populate' from /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/session.rb:481:in `post_without_logging' from /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/session.rb:491:in `post' from /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/logging.rb:27:in `log_fb_api' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/core_ext/benchmark.rb:8:in `realtime' from /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/logging.rb:27:in `log_fb_api' from /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/session.rb:490:in `post' from /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/models/user.rb:112:in `populate' from /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/model.rb:35:in `first_name' from (irb):6 from (irb):6:in `select' from (irb):6> >> friends[0].first_name => "Lindsay" >> friends[3].first_name Facebooker::Session::ExtendedPermissionRequired: Updating status requires the extended permission status_update from /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/parser.rb:481:in `process' from /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/parser.rb:15:in `parse' from /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/service.rb:14:in `post' from /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/session.rb:480:in `post_without_logging' from /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/session.rb:491:in `post' from /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/logging.rb:27:in `log_fb_api' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/core_ext/benchmark.rb:8:in `realtime' from /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/logging.rb:27:in `log_fb_api' from /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/session.rb:490:in `post' from /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/models/user.rb:230:in `status=' from /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/model.rb:114:in `__send__' from /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/model.rb:114:in `populate_from_hash!' from /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/model.rb:111:in `each' from /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/model.rb:111:in `populate_from_hash!' from /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/models/user.rb:113:in `populate' from /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/session.rb:481:in `post_without_logging' from /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/session.rb:491:in `post' from /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/logging.rb:27:in `log_fb_api' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/core_ext/benchmark.rb:8:in `realtime' from /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/logging.rb:27:in `log_fb_api' from /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/session.rb:490:in `post' from /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/models/user.rb:112:in `populate' from /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/model.rb:35:in `first_name' from (irb):8 >> friends[4].first_name => "Alexandra" -------------- next part -------------- An HTML attachment was scrubbed... URL: From josh.m.sharpe at gmail.com Wed Dec 10 21:55:39 2008 From: josh.m.sharpe at gmail.com (Josh Sharpe) Date: Wed, 10 Dec 2008 21:55:39 -0500 Subject: [Facebooker-talk] friends.select bug? In-Reply-To: <6a7129610812101550n3cb1c99dvef20788791a3db10@mail.gmail.com> References: <6a7129610812101550n3cb1c99dvef20788791a3db10@mail.gmail.com> Message-ID: <6a7129610812101855g75ccab3av637a6bd284c44ef9@mail.gmail.com> I have noticed that this happens for any friend who actually has a status. So accessing any attribute on that user causes it to blow up. Not sure why, still digging through the logic that adds all the attr_accessors to the user object.... On Wed, Dec 10, 2008 at 6:50 PM, Josh Sharpe wrote: > What is going on here... I thought this was some mod I made to the plugin, > so I cloned a fresh copy off of git hub and still got the same results. > > >> u = User.find(4).facebooker_user > => # > >> friends = u.friends > . > . > . > >> friends.size > => 118 > >> friends.select{|f| f.first_name == "Sami"} > Facebooker::Session::ExtendedPermissionRequired: Updating status requires > the extended permission status_update > from > /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/parser.rb:481:in > `process' > from > /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/parser.rb:15:in > `parse' > from > /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/service.rb:14:in > `post' > from > /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/session.rb:480:in > `post_without_logging' > from > /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/session.rb:491:in > `post' > from > /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/logging.rb:27:in > `log_fb_api' > from > /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/core_ext/benchmark.rb:8:in > `realtime' > from > /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/logging.rb:27:in > `log_fb_api' > from > /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/session.rb:490:in > `post' > from > /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/models/user.rb:230:in > `status=' > from > /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/model.rb:114:in > `__send__' > from > /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/model.rb:114:in > `populate_from_hash!' > from > /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/model.rb:111:in > `each' > from > /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/model.rb:111:in > `populate_from_hash!' > from > /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/models/user.rb:113:in > `populate' > from > /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/session.rb:481:in > `post_without_logging' > from > /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/session.rb:491:in > `post' > from > /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/logging.rb:27:in > `log_fb_api' > from > /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/core_ext/benchmark.rb:8:in > `realtime' > from > /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/logging.rb:27:in > `log_fb_api' > from > /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/session.rb:490:in > `post' > from > /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/models/user.rb:112:in > `populate' > from > /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/model.rb:35:in > `first_name' > from (irb):6 > from (irb):6:in `select' > from (irb):6> > > >> friends[0].first_name > => "Lindsay" > > >> friends[3].first_name > Facebooker::Session::ExtendedPermissionRequired: Updating status requires > the extended permission status_update > from > /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/parser.rb:481:in > `process' > from > /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/parser.rb:15:in > `parse' > from > /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/service.rb:14:in > `post' > from > /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/session.rb:480:in > `post_without_logging' > from > /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/session.rb:491:in > `post' > from > /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/logging.rb:27:in > `log_fb_api' > from > /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/core_ext/benchmark.rb:8:in > `realtime' > from > /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/logging.rb:27:in > `log_fb_api' > from > /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/session.rb:490:in > `post' > from > /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/models/user.rb:230:in > `status=' > from > /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/model.rb:114:in > `__send__' > from > /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/model.rb:114:in > `populate_from_hash!' > from > /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/model.rb:111:in > `each' > from > /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/model.rb:111:in > `populate_from_hash!' > from > /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/models/user.rb:113:in > `populate' > from > /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/session.rb:481:in > `post_without_logging' > from > /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/session.rb:491:in > `post' > from > /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/logging.rb:27:in > `log_fb_api' > from > /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/core_ext/benchmark.rb:8:in > `realtime' > from > /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/logging.rb:27:in > `log_fb_api' > from > /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/session.rb:490:in > `post' > from > /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/models/user.rb:112:in > `populate' > from > /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/model.rb:35:in > `first_name' > from (irb):8 > > >> friends[4].first_name > => "Alexandra" > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From josh.m.sharpe at gmail.com Thu Dec 11 00:10:12 2008 From: josh.m.sharpe at gmail.com (Josh Sharpe) Date: Thu, 11 Dec 2008 00:10:12 -0500 Subject: [Facebooker-talk] friends.select bug? In-Reply-To: <6a7129610812101855g75ccab3av637a6bd284c44ef9@mail.gmail.com> References: <6a7129610812101550n3cb1c99dvef20788791a3db10@mail.gmail.com> <6a7129610812101855g75ccab3av637a6bd284c44ef9@mail.gmail.com> Message-ID: <6a7129610812102110i1fa89e94md3b4788d42a5a74c@mail.gmail.com> So still not sure if this is a bug or not, it'd be nice if someone else could confirm they're seeing this too... Here's what I did to fix it. Again not sure if it's the best way.... So FB returns "" when a users's status is empty. populate_from_hash! then calls User#status="" . User#status= calls the FB users.setStatus method when the arg is a String so it was blowing up on the perm error. So I just blocked populate_from_hash! from setting the status if the value was a string since at this point we certainly don't want to make any calls to FB to reset the users status (even if we have permission) class Model def populate_from_hash!(hash) unless hash.empty? hash.each do |key, value| set_attr_method = "#{key}=" *unless key == "status" && value.is_a?(String)* if respond_to?(set_attr_method) self.__send__(set_attr_method, value) else Facebooker::Logging.log_info("**Warning**, Attempt to set non-attribute: #{key}",hash) end *end* end @populated = true end end end On Wed, Dec 10, 2008 at 9:55 PM, Josh Sharpe wrote: > I have noticed that this happens for any friend who actually has a status. > So accessing any attribute on that user causes it to blow up. Not sure why, > still digging through the logic that adds all the attr_accessors to the user > object.... > > > On Wed, Dec 10, 2008 at 6:50 PM, Josh Sharpe wrote: > >> What is going on here... I thought this was some mod I made to the >> plugin, so I cloned a fresh copy off of git hub and still got the same >> results. >> >> >> u = User.find(4).facebooker_user >> => # >> >> friends = u.friends >> . >> . >> . >> >> friends.size >> => 118 >> >> friends.select{|f| f.first_name == "Sami"} >> Facebooker::Session::ExtendedPermissionRequired: Updating status requires >> the extended permission status_update >> from >> /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/parser.rb:481:in >> `process' >> from >> /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/parser.rb:15:in >> `parse' >> from >> /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/service.rb:14:in >> `post' >> from >> /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/session.rb:480:in >> `post_without_logging' >> from >> /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/session.rb:491:in >> `post' >> from >> /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/logging.rb:27:in >> `log_fb_api' >> from >> /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/core_ext/benchmark.rb:8:in >> `realtime' >> from >> /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/logging.rb:27:in >> `log_fb_api' >> from >> /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/session.rb:490:in >> `post' >> from >> /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/models/user.rb:230:in >> `status=' >> from >> /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/model.rb:114:in >> `__send__' >> from >> /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/model.rb:114:in >> `populate_from_hash!' >> from >> /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/model.rb:111:in >> `each' >> from >> /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/model.rb:111:in >> `populate_from_hash!' >> from >> /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/models/user.rb:113:in >> `populate' >> from >> /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/session.rb:481:in >> `post_without_logging' >> from >> /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/session.rb:491:in >> `post' >> from >> /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/logging.rb:27:in >> `log_fb_api' >> from >> /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/core_ext/benchmark.rb:8:in >> `realtime' >> from >> /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/logging.rb:27:in >> `log_fb_api' >> from >> /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/session.rb:490:in >> `post' >> from >> /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/models/user.rb:112:in >> `populate' >> from >> /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/model.rb:35:in >> `first_name' >> from (irb):6 >> from (irb):6:in `select' >> from (irb):6> >> >> >> friends[0].first_name >> => "Lindsay" >> >> >> friends[3].first_name >> Facebooker::Session::ExtendedPermissionRequired: Updating status requires >> the extended permission status_update >> from >> /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/parser.rb:481:in >> `process' >> from >> /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/parser.rb:15:in >> `parse' >> from >> /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/service.rb:14:in >> `post' >> from >> /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/session.rb:480:in >> `post_without_logging' >> from >> /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/session.rb:491:in >> `post' >> from >> /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/logging.rb:27:in >> `log_fb_api' >> from >> /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/core_ext/benchmark.rb:8:in >> `realtime' >> from >> /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/logging.rb:27:in >> `log_fb_api' >> from >> /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/session.rb:490:in >> `post' >> from >> /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/models/user.rb:230:in >> `status=' >> from >> /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/model.rb:114:in >> `__send__' >> from >> /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/model.rb:114:in >> `populate_from_hash!' >> from >> /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/model.rb:111:in >> `each' >> from >> /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/model.rb:111:in >> `populate_from_hash!' >> from >> /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/models/user.rb:113:in >> `populate' >> from >> /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/session.rb:481:in >> `post_without_logging' >> from >> /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/session.rb:491:in >> `post' >> from >> /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/logging.rb:27:in >> `log_fb_api' >> from >> /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/core_ext/benchmark.rb:8:in >> `realtime' >> from >> /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/logging.rb:27:in >> `log_fb_api' >> from >> /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/session.rb:490:in >> `post' >> from >> /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/models/user.rb:112:in >> `populate' >> from >> /home/josh/ridecharge/facebook/vendor/plugins/facebooker/lib/facebooker/model.rb:35:in >> `first_name' >> from (irb):8 >> >> >> friends[4].first_name >> => "Alexandra" >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mmangino at elevatedrails.com Thu Dec 11 10:02:40 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Thu, 11 Dec 2008 10:02:40 -0500 Subject: [Facebooker-talk] friends.select bug? In-Reply-To: <6a7129610812102110i1fa89e94md3b4788d42a5a74c@mail.gmail.com> References: <6a7129610812101550n3cb1c99dvef20788791a3db10@mail.gmail.com> <6a7129610812101855g75ccab3av637a6bd284c44ef9@mail.gmail.com> <6a7129610812102110i1fa89e94md3b4788d42a5a74c@mail.gmail.com> Message-ID: <0E51DCDF-EDCF-4F98-80FC-4B26EAC81368@elevatedrails.com> Wow, good find. As much as I like being able to override assignment, this is an example of where that is a bad idea. Let's disable that and require that set_status be called. I'll make that change today. Mike On Dec 11, 2008, at 12:10 AM, Josh Sharpe wrote: > So still not sure if this is a bug or not, it'd be nice if someone > else could confirm they're seeing this too... Here's what I did to > fix it. Again not sure if it's the best way.... > > So FB returns "" when a users's status is empty. > populate_from_hash! then calls User#status="" . User#status= calls > the FB users.setStatus method when the arg is a String so it was > blowing up on the perm error. So I just blocked populate_from_hash! > from setting the status if the value was a string since at this > point we certainly don't want to make any calls to FB to reset the > users status (even if we have permission) > > class Model > def populate_from_hash!(hash) > unless hash.empty? > hash.each do |key, value| > set_attr_method = "#{key}=" > unless key == "status" && value.is_a?(String) > if respond_to?(set_attr_method) > self.__send__(set_attr_method, value) > else > Facebooker::Logging.log_info("**Warning**, Attempt to > set non-attribute: #{key}",hash) > end > end > end > @populated = true > end > end > end > > > On Wed, Dec 10, 2008 at 9:55 PM, Josh Sharpe > wrote: > I have noticed that this happens for any friend who actually has a > status. So accessing any attribute on that user causes it to blow > up. Not sure why, still digging through the logic that adds all the > attr_accessors to the user object.... > > > On Wed, Dec 10, 2008 at 6:50 PM, Josh Sharpe > wrote: > What is going on here... I thought this was some mod I made to the > plugin, so I cloned a fresh copy off of git hub and still got the > same results. > > >> u = User.find(4).facebooker_user > => # > >> friends = u.friends > . > . > . > >> friends.size > => 118 > >> friends.select{|f| f.first_name == "Sami"} > Facebooker::Session::ExtendedPermissionRequired: Updating status > requires the extended permission status_update > from /home/josh/ridecharge/facebook/vendor/plugins/facebooker/ > lib/facebooker/parser.rb:481:in `process' > from /home/josh/ridecharge/facebook/vendor/plugins/facebooker/ > lib/facebooker/parser.rb:15:in `parse' > from /home/josh/ridecharge/facebook/vendor/plugins/facebooker/ > lib/facebooker/service.rb:14:in `post' > from /home/josh/ridecharge/facebook/vendor/plugins/facebooker/ > lib/facebooker/session.rb:480:in `post_without_logging' > from /home/josh/ridecharge/facebook/vendor/plugins/facebooker/ > lib/facebooker/session.rb:491:in `post' > from /home/josh/ridecharge/facebook/vendor/plugins/facebooker/ > lib/facebooker/logging.rb:27:in `log_fb_api' > from /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/ > active_support/core_ext/benchmark.rb:8:in `realtime' > from /home/josh/ridecharge/facebook/vendor/plugins/facebooker/ > lib/facebooker/logging.rb:27:in `log_fb_api' > from /home/josh/ridecharge/facebook/vendor/plugins/facebooker/ > lib/facebooker/session.rb:490:in `post' > from /home/josh/ridecharge/facebook/vendor/plugins/facebooker/ > lib/facebooker/models/user.rb:230:in `status=' > from /home/josh/ridecharge/facebook/vendor/plugins/facebooker/ > lib/facebooker/model.rb:114:in `__send__' > from /home/josh/ridecharge/facebook/vendor/plugins/facebooker/ > lib/facebooker/model.rb:114:in `populate_from_hash!' > from /home/josh/ridecharge/facebook/vendor/plugins/facebooker/ > lib/facebooker/model.rb:111:in `each' > from /home/josh/ridecharge/facebook/vendor/plugins/facebooker/ > lib/facebooker/model.rb:111:in `populate_from_hash!' > from /home/josh/ridecharge/facebook/vendor/plugins/facebooker/ > lib/facebooker/models/user.rb:113:in `populate' > from /home/josh/ridecharge/facebook/vendor/plugins/facebooker/ > lib/facebooker/session.rb:481:in `post_without_logging' > from /home/josh/ridecharge/facebook/vendor/plugins/facebooker/ > lib/facebooker/session.rb:491:in `post' > from /home/josh/ridecharge/facebook/vendor/plugins/facebooker/ > lib/facebooker/logging.rb:27:in `log_fb_api' > from /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/ > active_support/core_ext/benchmark.rb:8:in `realtime' > from /home/josh/ridecharge/facebook/vendor/plugins/facebooker/ > lib/facebooker/logging.rb:27:in `log_fb_api' > from /home/josh/ridecharge/facebook/vendor/plugins/facebooker/ > lib/facebooker/session.rb:490:in `post' > from /home/josh/ridecharge/facebook/vendor/plugins/facebooker/ > lib/facebooker/models/user.rb:112:in `populate' > from /home/josh/ridecharge/facebook/vendor/plugins/facebooker/ > lib/facebooker/model.rb:35:in `first_name' > from (irb):6 > from (irb):6:in `select' > from (irb):6> > > >> friends[0].first_name > => "Lindsay" > > >> friends[3].first_name > Facebooker::Session::ExtendedPermissionRequired: Updating status > requires the extended permission status_update > from /home/josh/ridecharge/facebook/vendor/plugins/ > facebooker/lib/facebooker/parser.rb:481:in `process' > from /home/josh/ridecharge/facebook/vendor/plugins/ > facebooker/lib/facebooker/parser.rb:15:in `parse' > from /home/josh/ridecharge/facebook/vendor/plugins/ > facebooker/lib/facebooker/service.rb:14:in `post' > from /home/josh/ridecharge/facebook/vendor/plugins/ > facebooker/lib/facebooker/session.rb:480:in `post_without_logging' > from /home/josh/ridecharge/facebook/vendor/plugins/ > facebooker/lib/facebooker/session.rb:491:in `post' > from /home/josh/ridecharge/facebook/vendor/plugins/ > facebooker/lib/facebooker/logging.rb:27:in `log_fb_api' > from /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/ > active_support/core_ext/benchmark.rb:8:in `realtime' > from /home/josh/ridecharge/facebook/vendor/plugins/ > facebooker/lib/facebooker/logging.rb:27:in `log_fb_api' > from /home/josh/ridecharge/facebook/vendor/plugins/ > facebooker/lib/facebooker/session.rb:490:in `post' > from /home/josh/ridecharge/facebook/vendor/plugins/ > facebooker/lib/facebooker/models/user.rb:230:in `status=' > from /home/josh/ridecharge/facebook/vendor/plugins/ > facebooker/lib/facebooker/model.rb:114:in `__send__' > from /home/josh/ridecharge/facebook/vendor/plugins/ > facebooker/lib/facebooker/model.rb:114:in `populate_from_hash!' > from /home/josh/ridecharge/facebook/vendor/plugins/ > facebooker/lib/facebooker/model.rb:111:in `each' > from /home/josh/ridecharge/facebook/vendor/plugins/ > facebooker/lib/facebooker/model.rb:111:in `populate_from_hash!' > from /home/josh/ridecharge/facebook/vendor/plugins/ > facebooker/lib/facebooker/models/user.rb:113:in `populate' > from /home/josh/ridecharge/facebook/vendor/plugins/ > facebooker/lib/facebooker/session.rb:481:in `post_without_logging' > from /home/josh/ridecharge/facebook/vendor/plugins/ > facebooker/lib/facebooker/session.rb:491:in `post' > from /home/josh/ridecharge/facebook/vendor/plugins/ > facebooker/lib/facebooker/logging.rb:27:in `log_fb_api' > from /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/ > active_support/core_ext/benchmark.rb:8:in `realtime' > from /home/josh/ridecharge/facebook/vendor/plugins/ > facebooker/lib/facebooker/logging.rb:27:in `log_fb_api' > from /home/josh/ridecharge/facebook/vendor/plugins/ > facebooker/lib/facebooker/session.rb:490:in `post' > from /home/josh/ridecharge/facebook/vendor/plugins/ > facebooker/lib/facebooker/models/user.rb:112:in `populate' > from /home/josh/ridecharge/facebook/vendor/plugins/ > facebooker/lib/facebooker/model.rb:35:in `first_name' > from (irb):8 > > >> friends[4].first_name > => "Alexandra" > > > > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk -- Mike Mangino http://www.elevatedrails.com From lee at crossbonesystems.com Thu Dec 11 16:53:58 2008 From: lee at crossbonesystems.com (Lee Mallabone) Date: Thu, 11 Dec 2008 21:53:58 +0000 Subject: [Facebooker-talk] forms and IncorrectSignature (with test) In-Reply-To: References: Message-ID: Hi Mike, Thanks for investigating this further. I've added my votes to that bug. I'm afraid I don't think I understand your workaround fully: how would the iframe interact with my GET-based form? Thanks, Lee. 2008/12/10 Mike Mangino : > Lee, thanks for the test application. It appears that this is actually a > Facebook bug. > > http://bugs.developers.facebook.com/show_bug.cgi?id=544 > > Luckily, we can work around it. The newest version of Facebooker monkey > patches Rails to remove facebook parameters from the get parameters. It only > does this if there are post parameters, so you can still stick the Facebook > parameters in a request to an IFrame to make the IFrame share a session with > your Facebook request. > > Mike > > On Dec 10, 2008, at 6:50 AM, Lee Mallabone wrote: > >> Hi, >> >> I'm trying to get a form to work on a facebook canvas page with >> method="get". >> >> As I understand it, this should be possible. However, every time I >> change my (perfectly working) form a POST form to a GET form, I get >> the Facebooker::Session::IncorrectSignature exception raised. >> >> I've created a trivial test app that demonstrates this behaviour >> outside of my app. It can be downloaded from: >> http://www.crossbonesystems.com/wp-content/uploads/2008/12/fbformhelp1.zip >> >> Just drop in any working facebooker.yml in the config directory and >> the latest facebooker plugin (from github) into vendor/plugin and >> navigate to: >> >> http://apps.facebook.com/YOURAPP/runme/test >> >> You should see a simple page with two forms: one is a POST form (that >> works), the other is a GET form (that throws the above). They use the >> standard form_for helper (not the facebook_form_for). >> >> Can anyone verify my results? Am I missing a step in my form >> generation or is this a bug in facebooker? Mike, any pointers on how I >> can help fix this? >> >> Thanks, >> Lee. >> >> >> -- >> Lee Mallabone. >> Crossbone Systems Ltd. >> >> http://www.crossbonesystems.com/ >> http://www.fonicmonkey.net/ >> http://CambridgeWebHeads.ning.com/ >> >> >> >> -- >> Lee Mallabone. >> Crossbone Systems Ltd. >> >> http://www.crossbonesystems.com/ >> http://www.fonicmonkey.net/ >> http://CambridgeWebHeads.ning.com/ >> >> >> >> -- >> Lee Mallabone. >> 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 > > > > -- Lee Mallabone. Crossbone Systems Ltd. http://www.crossbonesystems.com/ http://www.fonicmonkey.net/ http://CambridgeWebHeads.ning.com/ From mmangino at elevatedrails.com Thu Dec 11 17:24:37 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Thu, 11 Dec 2008 17:24:37 -0500 Subject: [Facebooker-talk] forms and IncorrectSignature (with test) In-Reply-To: References: Message-ID: Sorry for the long windedness. Try the newest version of Facebooker. I think it fixes your problem. Mike On Dec 11, 2008, at 4:53 PM, Lee Mallabone wrote: > Hi Mike, > > Thanks for investigating this further. I've added my votes to that > bug. > > I'm afraid I don't think I understand your workaround fully: how would > the iframe interact with my GET-based form? > > Thanks, > Lee. > > > 2008/12/10 Mike Mangino : >> Lee, thanks for the test application. It appears that this is >> actually a >> Facebook bug. >> >> http://bugs.developers.facebook.com/show_bug.cgi?id=544 >> >> Luckily, we can work around it. The newest version of Facebooker >> monkey >> patches Rails to remove facebook parameters from the get >> parameters. It only >> does this if there are post parameters, so you can still stick the >> Facebook >> parameters in a request to an IFrame to make the IFrame share a >> session with >> your Facebook request. >> >> Mike >> >> On Dec 10, 2008, at 6:50 AM, Lee Mallabone wrote: >> >>> Hi, >>> >>> I'm trying to get a form to work on a facebook canvas page with >>> method="get". >>> >>> As I understand it, this should be possible. However, every time I >>> change my (perfectly working) form a POST form to a GET form, I get >>> the Facebooker::Session::IncorrectSignature exception raised. >>> >>> I've created a trivial test app that demonstrates this behaviour >>> outside of my app. It can be downloaded from: >>> http://www.crossbonesystems.com/wp-content/uploads/2008/12/fbformhelp1.zip >>> >>> Just drop in any working facebooker.yml in the config directory and >>> the latest facebooker plugin (from github) into vendor/plugin and >>> navigate to: >>> >>> http://apps.facebook.com/YOURAPP/runme/test >>> >>> You should see a simple page with two forms: one is a POST form >>> (that >>> works), the other is a GET form (that throws the above). They use >>> the >>> standard form_for helper (not the facebook_form_for). >>> >>> Can anyone verify my results? Am I missing a step in my form >>> generation or is this a bug in facebooker? Mike, any pointers on >>> how I >>> can help fix this? >>> >>> Thanks, >>> Lee. >>> >>> >>> -- >>> Lee Mallabone. >>> Crossbone Systems Ltd. >>> >>> http://www.crossbonesystems.com/ >>> http://www.fonicmonkey.net/ >>> http://CambridgeWebHeads.ning.com/ >>> >>> >>> >>> -- >>> Lee Mallabone. >>> Crossbone Systems Ltd. >>> >>> http://www.crossbonesystems.com/ >>> http://www.fonicmonkey.net/ >>> http://CambridgeWebHeads.ning.com/ >>> >>> >>> >>> -- >>> Lee Mallabone. >>> 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 >> >> >> >> > > > > -- > Lee Mallabone. > Crossbone Systems Ltd. > > http://www.crossbonesystems.com/ > http://www.fonicmonkey.net/ > http://CambridgeWebHeads.ning.com/ -- Mike Mangino http://www.elevatedrails.com From lee at crossbonesystems.com Fri Dec 12 15:14:07 2008 From: lee at crossbonesystems.com (Lee Mallabone) Date: Fri, 12 Dec 2008 20:14:07 +0000 Subject: [Facebooker-talk] forms and IncorrectSignature (with test) In-Reply-To: References: Message-ID: Hi Mike, I did a git pull on my local copy of facebooker but I'm still seeing the issue with GET forms in my rails test app. Do I need to configure the workaround explicitly? Thanks, Lee. 2008/12/11 Mike Mangino : > Sorry for the long windedness. Try the newest version of Facebooker. I think > it fixes your problem. > > Mike > > On Dec 11, 2008, at 4:53 PM, Lee Mallabone wrote: > >> Hi Mike, >> >> Thanks for investigating this further. I've added my votes to that bug. >> >> I'm afraid I don't think I understand your workaround fully: how would >> the iframe interact with my GET-based form? >> >> Thanks, >> Lee. >> >> >> 2008/12/10 Mike Mangino : >>> >>> Lee, thanks for the test application. It appears that this is actually a >>> Facebook bug. >>> >>> http://bugs.developers.facebook.com/show_bug.cgi?id=544 >>> >>> Luckily, we can work around it. The newest version of Facebooker monkey >>> patches Rails to remove facebook parameters from the get parameters. It >>> only >>> does this if there are post parameters, so you can still stick the >>> Facebook >>> parameters in a request to an IFrame to make the IFrame share a session >>> with >>> your Facebook request. >>> >>> Mike >>> >>> On Dec 10, 2008, at 6:50 AM, Lee Mallabone wrote: >>> >>>> Hi, >>>> >>>> I'm trying to get a form to work on a facebook canvas page with >>>> method="get". >>>> >>>> As I understand it, this should be possible. However, every time I >>>> change my (perfectly working) form a POST form to a GET form, I get >>>> the Facebooker::Session::IncorrectSignature exception raised. >>>> >>>> I've created a trivial test app that demonstrates this behaviour >>>> outside of my app. It can be downloaded from: >>>> >>>> http://www.crossbonesystems.com/wp-content/uploads/2008/12/fbformhelp1.zip >>>> >>>> Just drop in any working facebooker.yml in the config directory and >>>> the latest facebooker plugin (from github) into vendor/plugin and >>>> navigate to: >>>> >>>> http://apps.facebook.com/YOURAPP/runme/test >>>> >>>> You should see a simple page with two forms: one is a POST form (that >>>> works), the other is a GET form (that throws the above). They use the >>>> standard form_for helper (not the facebook_form_for). >>>> >>>> Can anyone verify my results? Am I missing a step in my form >>>> generation or is this a bug in facebooker? Mike, any pointers on how I >>>> can help fix this? >>>> >>>> Thanks, >>>> Lee. >>>> >>>> >>>> -- >>>> Lee Mallabone. >>>> Crossbone Systems Ltd. >>>> >>>> http://www.crossbonesystems.com/ >>>> http://www.fonicmonkey.net/ >>>> http://CambridgeWebHeads.ning.com/ >>>> >>>> >>>> >>>> -- >>>> Lee Mallabone. >>>> Crossbone Systems Ltd. >>>> >>>> http://www.crossbonesystems.com/ >>>> http://www.fonicmonkey.net/ >>>> http://CambridgeWebHeads.ning.com/ >>>> >>>> >>>> >>>> -- >>>> Lee Mallabone. >>>> 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 >>> >>> >>> >>> >> >> >> >> -- >> Lee Mallabone. >> Crossbone Systems Ltd. >> >> http://www.crossbonesystems.com/ >> http://www.fonicmonkey.net/ >> http://CambridgeWebHeads.ning.com/ > > -- > Mike Mangino > http://www.elevatedrails.com > > > > -- Lee Mallabone. Crossbone Systems Ltd. http://www.crossbonesystems.com/ http://www.fonicmonkey.net/ http://CambridgeWebHeads.ning.com/ From george at xapblog.com Fri Dec 12 17:06:33 2008 From: george at xapblog.com (George Deglin) Date: Fri, 12 Dec 2008 14:06:33 -0800 Subject: [Facebooker-talk] facebook.auth.getSession failed Message-ID: A new user recently attempted to use my app and generated the following error: A Facebooker::Session::MissingOrInvalidParameter occurred in home#index: Invalid parameter [RAILS_ROOT]/vendor/plugins/facebooker/lib/facebooker/parser.rb:487:in `process' This appears to have happened when facebooker attempted to parse the response of facebook.auth.getSession. I have never seen anything fail in this area, so I'm eager to write this off as a temporary facebook quirk, but I don't see anyone else reporting problems on the developer forums. Is anyone else seeing this problem? The failure was in this method: def self.process(data) 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']) #### line 487 end end Here are the request parameters and the backtrace: ------------------------------- Request: ------------------------------- * URL : http://**. inigral.com/?auth_token=34a2311df88b8a1f3a847064e7450407&installed=1 * IP address: 69.63.176.230 * Parameters: {"format"=>"fbml", "fb_sig_time"=>"1229116842.827", "fb_sig"=>"b720e5366299ba47e676874d4be4457c", "fb_sig_in_new_facebook"=>"1", "_method"=>"GET", "fb_sig_locale"=>"en_US", "installed"=>"1", "action"=>"index", "fb_sig_position_fix"=>"1", "fb_sig_in_canvas"=>"1", "fb_sig_request_method"=>"GET", "auth_token"=>"34a2311df88b8a1f3a847064e7450407", "controller"=>"home", "fb_sig_added"=>"0", "fb_sig_api_key"=>"4ea2871be8fb71d66673d3692d94c6bc"} ------------------------------- Backtrace: ------------------------------- [RAILS_ROOT]/vendor/plugins/facebooker/lib/facebooker/parser.rb:487:in `process' [RAILS_ROOT]/vendor/plugins/facebooker/lib/facebooker/parser.rb:15:in `parse_without_logging' [RAILS_ROOT]/lib/facebooker_extensions.rb:18:in `parse' [RAILS_ROOT]/vendor/plugins/facebooker/lib/facebooker/service.rb:14:in `post_without_api_logging' [RAILS_ROOT]/lib/facebooker_extensions.rb:7:in `post' [RAILS_ROOT]/vendor/plugins/facebooker/lib/facebooker/session.rb:485:in `post_without_logging' [RAILS_ROOT]/vendor/plugins/facebooker/lib/facebooker/session.rb:496:in `post' [RAILS_ROOT]/vendor/plugins/facebooker/lib/facebooker/logging.rb:17:in `log_fb_api' /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/core_ext/benchmark.rb:8:in `realtime' [RAILS_ROOT]/vendor/plugins/facebooker/lib/facebooker/logging.rb:17:in `log_fb_api' [RAILS_ROOT]/vendor/plugins/facebooker/lib/facebooker/session.rb:495:in `post' [RAILS_ROOT]/vendor/plugins/facebooker/lib/facebooker/session.rb:155:in `secure!' [RAILS_ROOT]/vendor/plugins/facebooker/lib/facebooker/rails/controller.rb:72:in `secure_with_token!' [RAILS_ROOT]/vendor/plugins/facebooker/lib/facebooker/rails/controller.rb:27:in `set_facebook_session' [RAILS_ROOT]/vendor/plugins/facebooker/lib/facebooker/rails -------------- next part -------------- An HTML attachment was scrubbed... URL: From mjfreshyfresh at gmail.com Fri Dec 12 17:47:24 2008 From: mjfreshyfresh at gmail.com (Michael Jones) Date: Fri, 12 Dec 2008 14:47:24 -0800 Subject: [Facebooker-talk] Sending app_to_user notifications Message-ID: <8DE77949-FC01-45CE-AFA9-3EB0E1DAAC45@gmail.com> Is there an easy way to get FacebookPublisher to send notifications as 'app_to_user'? It's talked about here: http://wiki.developers.facebook.com/index.php/Notifications.send This is the attribute I need to set: type string Specify whether the notification is a user_to_user one or an app_to_user. (Default value is user_to_user.) Thanks- MJ From mjfreshyfresh at gmail.com Fri Dec 12 17:55:06 2008 From: mjfreshyfresh at gmail.com (Michael Jones) Date: Fri, 12 Dec 2008 14:55:06 -0800 Subject: [Facebooker-talk] Sending app_to_user notifications In-Reply-To: <8DE77949-FC01-45CE-AFA9-3EB0E1DAAC45@gmail.com> References: <8DE77949-FC01-45CE-AFA9-3EB0E1DAAC45@gmail.com> Message-ID: <11FD7468-90B1-4364-BC90-23EF1B1FD4E1@gmail.com> Actually I see now, just pass in nil as the from_user. app_to_user notifications are handy because you don't need an infinite session. On Dec 12, 2008, at 2:47 PM, Michael Jones wrote: > Is there an easy way to get FacebookPublisher to send notifications > as 'app_to_user'? > > It's talked about here: > http://wiki.developers.facebook.com/index.php/Notifications.send > > This is the attribute I need to set: > type string Specify whether the notification is a user_to_user > one or an app_to_user. (Default value is user_to_user.) > > Thanks- > MJ From lee at crossbonesystems.com Mon Dec 15 14:48:37 2008 From: lee at crossbonesystems.com (Lee Mallabone) Date: Mon, 15 Dec 2008 19:48:37 +0000 Subject: [Facebooker-talk] forms and IncorrectSignature (with test) In-Reply-To: References: Message-ID: Mike, I was still seeing the same errors in the test app after updating from github. I just installed rails 2.2.2 and generated a new test app and with the latest facebooker the GET forms seem to work fine. I guess the fix just doesn't take on rails 2.1.1 for some reason! Thanks for the patch, much appreciated. Lee. 2008/12/12 Lee Mallabone : > Hi Mike, > > I did a git pull on my local copy of facebooker but I'm still seeing > the issue with GET forms in my rails test app. Do I need to configure > the workaround explicitly? > > Thanks, > Lee. > > > 2008/12/11 Mike Mangino : >> Sorry for the long windedness. Try the newest version of Facebooker. I think >> it fixes your problem. >> >> Mike >> >> On Dec 11, 2008, at 4:53 PM, Lee Mallabone wrote: >> >>> Hi Mike, >>> >>> Thanks for investigating this further. I've added my votes to that bug. >>> >>> I'm afraid I don't think I understand your workaround fully: how would >>> the iframe interact with my GET-based form? >>> >>> Thanks, >>> Lee. >>> >>> >>> 2008/12/10 Mike Mangino : >>>> >>>> Lee, thanks for the test application. It appears that this is actually a >>>> Facebook bug. >>>> >>>> http://bugs.developers.facebook.com/show_bug.cgi?id=544 >>>> >>>> Luckily, we can work around it. The newest version of Facebooker monkey >>>> patches Rails to remove facebook parameters from the get parameters. It >>>> only >>>> does this if there are post parameters, so you can still stick the >>>> Facebook >>>> parameters in a request to an IFrame to make the IFrame share a session >>>> with >>>> your Facebook request. >>>> >>>> Mike >>>> >>>> On Dec 10, 2008, at 6:50 AM, Lee Mallabone wrote: >>>> >>>>> Hi, >>>>> >>>>> I'm trying to get a form to work on a facebook canvas page with >>>>> method="get". >>>>> >>>>> As I understand it, this should be possible. However, every time I >>>>> change my (perfectly working) form a POST form to a GET form, I get >>>>> the Facebooker::Session::IncorrectSignature exception raised. >>>>> >>>>> I've created a trivial test app that demonstrates this behaviour >>>>> outside of my app. It can be downloaded from: >>>>> >>>>> http://www.crossbonesystems.com/wp-content/uploads/2008/12/fbformhelp1.zip >>>>> >>>>> Just drop in any working facebooker.yml in the config directory and >>>>> the latest facebooker plugin (from github) into vendor/plugin and >>>>> navigate to: >>>>> >>>>> http://apps.facebook.com/YOURAPP/runme/test >>>>> >>>>> You should see a simple page with two forms: one is a POST form (that >>>>> works), the other is a GET form (that throws the above). They use the >>>>> standard form_for helper (not the facebook_form_for). >>>>> >>>>> Can anyone verify my results? Am I missing a step in my form >>>>> generation or is this a bug in facebooker? Mike, any pointers on how I >>>>> can help fix this? >>>>> >>>>> Thanks, >>>>> Lee. >>>>> >>>>> >>>>> -- >>>>> Lee Mallabone. >>>>> Crossbone Systems Ltd. >>>>> >>>>> http://www.crossbonesystems.com/ >>>>> http://www.fonicmonkey.net/ >>>>> http://CambridgeWebHeads.ning.com/ >>>>> >>>>> >>>>> >>>>> -- >>>>> Lee Mallabone. >>>>> Crossbone Systems Ltd. >>>>> >>>>> http://www.crossbonesystems.com/ >>>>> http://www.fonicmonkey.net/ >>>>> http://CambridgeWebHeads.ning.com/ >>>>> >>>>> >>>>> >>>>> -- >>>>> Lee Mallabone. >>>>> 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 >>>> >>>> >>>> >>>> >>> >>> >>> >>> -- >>> Lee Mallabone. >>> Crossbone Systems Ltd. >>> >>> http://www.crossbonesystems.com/ >>> http://www.fonicmonkey.net/ >>> http://CambridgeWebHeads.ning.com/ >> >> -- >> Mike Mangino >> http://www.elevatedrails.com >> >> >> >> > > > > -- > Lee Mallabone. > Crossbone Systems Ltd. > > http://www.crossbonesystems.com/ > http://www.fonicmonkey.net/ > http://CambridgeWebHeads.ning.com/ > -- Lee Mallabone. Crossbone Systems Ltd. http://www.crossbonesystems.com/ http://www.fonicmonkey.net/ http://CambridgeWebHeads.ning.com/ From george at xapblog.com Mon Dec 15 20:43:26 2008 From: george at xapblog.com (George Deglin) Date: Mon, 15 Dec 2008 17:43:26 -0800 Subject: [Facebooker-talk] Getting a test working Message-ID: A couple of months ago I forked facebooker and pushed a bunch of patches I've written for work to the fork. Today I finally had some time to write tests so I can submit the patches to core. This is my first time working with test_unit and I'm having some trouble getting the very first test I'm trying to write working. The patch I'm writing the test for is to fix a caching bug with events. A similar patch was pushed to core a few days ago but it only fixed @user.events and not @session.events. The patched version is: session.rb def events(options = {}) @events ||= {} @events[options.to_s] = post('facebook.events.get', options) do |response| response.map do |hash| Event.from_hash(hash) end end end The test I'm trying to get working is: session_test.rb def test_events_caching_honors_params expect_http_posts_with_responses(example_events_get_xml) Facebooker::Event.expects(:from_hash) @session.events Facebooker::Event.expects(:from_hash) @session.events(:eids => "1,2") Facebooker::Event.expects(:from_hash).never @session.events(:eids => "1,2") end When I run the test I get the following error: test_events_caching_honors_params(SessionTest): RuntimeError: Element events_get_response not found in ./test/../lib/facebooker/parser.rb:48:in `element' ./test/../lib/facebooker/parser.rb:373:in `process' ./test/../lib/facebooker/parser.rb:17:in `parse' ./test/../lib/facebooker/service.rb:14:in `post' ./test/../lib/facebooker/session.rb:486:in `post_without_loggin ./test/../lib/facebooker/session.rb:498:in `post' ./test/../lib/facebooker/logging.rb:27:in `log_fb_api' c:/ruby/lib/ruby/1.8/benchmark.rb:293:in `measure' c:/ruby/lib/ruby/1.8/benchmark.rb:307:in `realtime' ./test/../lib/facebooker/logging.rb:27:in `log_fb_api' ./test/../lib/facebooker/session.rb:497:in `post' ./test/../lib/facebooker/session.rb:201:in `events' test/session_test.rb:141:in `test_events_caching_honors_params' I've been trying to get this work for over an hour now. It seems that @session.events works fine but when I call @session.events(:eids => "1,2") I get the error above. Any idea where I might be going wrong? Thanks! From srjoseph at hawaii.edu Mon Dec 15 20:50:08 2008 From: srjoseph at hawaii.edu (Sam Joseph) Date: Mon, 15 Dec 2008 15:50:08 -1000 Subject: [Facebooker-talk] ApplicationProperties Message-ID: <49470950.8090408@hawaii.edu> Hi There, I was wondering what the appropriate way to use the applicationproperties.rb model was. I was hoping to query it to find out which users are developers for my app and then grant special permissions to them ... I tried creating something like this: class ApplicationProperties < ActiveRecord::Base def facebook_session @facebook_session ||= returning Facebooker::Session.create do |session| session.secure_with!(session_key,User.find(:first).facebook_id,1.hour.from_now) end end end but that doesn't seem to help, i.e. the facebook session thing is specific to the user model .... Many thanks in advance CHEERS> SAM -- Sam Joseph, Ph.D. Co-Director Laboratory for Interactive Learning Technologies Department of Information and Computer Sciences University of Hawaii From srjoseph at hawaii.edu Mon Dec 15 20:55:54 2008 From: srjoseph at hawaii.edu (Sam Joseph) Date: Mon, 15 Dec 2008 15:55:54 -1000 Subject: [Facebooker-talk] ApplicationProperties In-Reply-To: <49470950.8090408@hawaii.edu> References: <49470950.8090408@hawaii.edu> Message-ID: <49470AAA.8030500@hawaii.edu> I was just trying this: >> app.facebook_session.admin.get_app_properties NameError: uninitialized constant Facebooker::Admin::JSON from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/dependencies.rb:493:in `const_missing' from /Users/samueljoseph/Code/eclipse-workspace/stem_survey-fresh/vendor/plugins/facebooker/lib/facebooker/admin.rb:18:in `get_app_properties' from (irb):6 from :0 >> but get an error ... do I need a JSON gem or something? Many thanks in advance CHEERS> SAM Sam Joseph wrote: > Hi There, > > I was wondering what the appropriate way to use the > applicationproperties.rb model was. > > I was hoping to query it to find out which users are developers for my > app and then grant special permissions to them ... > > I tried creating something like this: > > class ApplicationProperties < ActiveRecord::Base > def facebook_session > @facebook_session ||= > returning Facebooker::Session.create do |session| > > session.secure_with!(session_key,User.find(:first).facebook_id,1.hour.from_now) > > end > end > end > > but that doesn't seem to help, i.e. the facebook session thing is > specific to the user model .... > > Many thanks in advance > CHEERS> SAM > -- Sam Joseph, Ph.D. Co-Director Laboratory for Interactive Learning Technologies Department of Information and Computer Sciences University of Hawaii From mmangino at elevatedrails.com Tue Dec 16 09:02:51 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Tue, 16 Dec 2008 09:02:51 -0500 Subject: [Facebooker-talk] Getting a test working In-Reply-To: References: Message-ID: Somehow the wrong response XML is being sent. I would try breaking that up into 3 tests and try to trace down where that XML is coming from. Mike On Dec 15, 2008, at 8:43 PM, George Deglin wrote: > A couple of months ago I forked facebooker and pushed a bunch of > patches I've written for work to the fork. Today I finally had some > time to write tests so I can submit the patches to core. > > This is my first time working with test_unit and I'm having some > trouble getting the very first test I'm trying to write working. > > The patch I'm writing the test for is to fix a caching bug with > events. A similar patch was pushed to core a few days ago but it only > fixed @user.events and not @session.events. > > The patched version is: > session.rb > > def events(options = {}) > @events ||= {} > @events[options.to_s] = post('facebook.events.get', options) do > |response| > response.map do |hash| > Event.from_hash(hash) > end > end > end > > The test I'm trying to get working is: > session_test.rb > > def test_events_caching_honors_params > expect_http_posts_with_responses(example_events_get_xml) > Facebooker::Event.expects(:from_hash) > @session.events > Facebooker::Event.expects(:from_hash) > @session.events(:eids => "1,2") > Facebooker::Event.expects(:from_hash).never > @session.events(:eids => "1,2") > end > > When I run the test I get the following error: > test_events_caching_honors_params(SessionTest): > RuntimeError: Element events_get_response not found in version="1.0" 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" > 3e4a22bb2f5ed75114b0fc9995ea85f1 > > ./test/../lib/facebooker/parser.rb:48:in `element' > ./test/../lib/facebooker/parser.rb:373:in `process' > ./test/../lib/facebooker/parser.rb:17:in `parse' > ./test/../lib/facebooker/service.rb:14:in `post' > ./test/../lib/facebooker/session.rb:486:in `post_without_loggin > ./test/../lib/facebooker/session.rb:498:in `post' > ./test/../lib/facebooker/logging.rb:27:in `log_fb_api' > c:/ruby/lib/ruby/1.8/benchmark.rb:293:in `measure' > c:/ruby/lib/ruby/1.8/benchmark.rb:307:in `realtime' > ./test/../lib/facebooker/logging.rb:27:in `log_fb_api' > ./test/../lib/facebooker/session.rb:497:in `post' > ./test/../lib/facebooker/session.rb:201:in `events' > test/session_test.rb:141:in `test_events_caching_honors_params' > > I've been trying to get this work for over an hour now. It seems that > @session.events works fine but when I call @session.events(:eids => > "1,2") I get the error above. > > Any idea where I might be going wrong? > > Thanks! > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk -- Mike Mangino http://www.elevatedrails.com From srjoseph at hawaii.edu Tue Dec 16 19:38:58 2008 From: srjoseph at hawaii.edu (Sam Joseph) Date: Tue, 16 Dec 2008 14:38:58 -1000 Subject: [Facebooker-talk] ApplicationProperties In-Reply-To: <5D0900A9-557B-4158-A9DD-8B62F1DBEA13@mac.com> References: <49470950.8090408@hawaii.edu> <49470AAA.8030500@hawaii.edu> <5D0900A9-557B-4158-A9DD-8B62F1DBEA13@mac.com> Message-ID: <49484A22.6060701@hawaii.edu> Hi David, Many thanks, that helped, i.e. removed the immediate error, but all the application properties themselves are nil: >> app = ApplicationProperties.find(1) => # >> prop = app.facebook_session.admin.get_app_properties [] >> prop.inspect => "#" >> prop.edit_url => nil >> prop.canvas_name => nil feels like I need some way to trace the XML being sent back and forth to get to the bottom of this ... CHEERS> SAM David Crockett wrote: > I have to add require 'json' to the top of facebooker.rb to use the > admin model. > > David Crockett > > On Dec 15, 2008, at 6:55 PM, Sam Joseph wrote: > >> I was just trying this: >> >> >> app.facebook_session.admin.get_app_properties >> NameError: uninitialized constant Facebooker::Admin::JSON >> from >> /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/dependencies.rb:493:in >> `const_missing' >> from >> /Users/samueljoseph/Code/eclipse-workspace/stem_survey-fresh/vendor/plugins/facebooker/lib/facebooker/admin.rb:18:in >> `get_app_properties' >> from (irb):6 >> from :0 >> >> >> >> >> but get an error ... >> >> do I need a JSON gem or something? >> >> Many thanks in advance >> CHEERS> SAM >> >> Sam Joseph wrote: >>> Hi There, >>> >>> I was wondering what the appropriate way to use the >>> applicationproperties.rb model was. >>> >>> I was hoping to query it to find out which users are developers for >>> my app and then grant special permissions to them ... >>> >>> I tried creating something like this: >>> >>> class ApplicationProperties < ActiveRecord::Base >>> def facebook_session >>> @facebook_session ||= >>> returning Facebooker::Session.create do |session| >>> >>> session.secure_with!(session_key,User.find(:first).facebook_id,1.hour.from_now) >>> >>> end >>> end >>> end >>> >>> but that doesn't seem to help, i.e. the facebook session thing is >>> specific to the user model .... >>> >>> Many thanks in advance >>> CHEERS> SAM >>> >> >> >> -- >> Sam Joseph, Ph.D. >> Co-Director >> Laboratory for Interactive Learning Technologies >> Department of Information and Computer Sciences >> University of Hawaii >> >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/facebooker-talk > -- Sam Joseph, Ph.D. Co-Director Laboratory for Interactive Learning Technologies Department of Information and Computer Sciences University of Hawaii From idavidcrockett at gmail.com Tue Dec 16 19:50:08 2008 From: idavidcrockett at gmail.com (David Crockett) Date: Tue, 16 Dec 2008 17:50:08 -0700 Subject: [Facebooker-talk] ApplicationProperties In-Reply-To: <49484A22.6060701@hawaii.edu> References: <49470950.8090408@hawaii.edu> <49470AAA.8030500@hawaii.edu> <5D0900A9-557B-4158-A9DD-8B62F1DBEA13@mac.com> <49484A22.6060701@hawaii.edu> Message-ID: <05472CEC-836E-4996-9CFE-25BA905F803C@gmail.com> Hey Sam, I store facebook app parameters in a database instead of facebooker.yml. It appears that you are doing the same. This is my code: class FacebookApplication < ActiveRecord::Base ... # the api_key and api_secret are loaded from the database def logo_url Facebooker::Session.new(api_key, api_secret).admin.get_app_properties(:logo_url).logo_url end end Also further inspection shows that I am adding require 'json' to the top of admin.rb, not facebooker.rb Good luck, David On Dec 16, 2008, at 5:38 PM, Sam Joseph wrote: > Hi David, > > Many thanks, that helped, i.e. removed the immediate error, but all > the application properties themselves are nil: > > >> app = ApplicationProperties.find(1) > => # "5953de36a0fccdec831bca3d5f57f8f7", session_key: nil, created_at: > "2008-12-16 01:44:16", updated_at: "2008-12-16 01:44:16"> > >> prop = app.facebook_session.admin.get_app_properties > [] > >> prop.inspect > => "#" > >> prop.edit_url > => nil > >> prop.canvas_name > => nil > > feels like I need some way to trace the XML being sent back and > forth to get to the bottom of this ... > > CHEERS> SAM > > David Crockett wrote: >> I have to add require 'json' to the top of facebooker.rb to use the >> admin model. >> >> David Crockett >> >> On Dec 15, 2008, at 6:55 PM, Sam Joseph wrote: >> >>> I was just trying this: >>> >>> >> app.facebook_session.admin.get_app_properties >>> NameError: uninitialized constant Facebooker::Admin::JSON >>> from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/ >>> active_support/dependencies.rb:493:in `const_missing' >>> from /Users/samueljoseph/Code/eclipse-workspace/stem_survey-fresh/ >>> vendor/plugins/facebooker/lib/facebooker/admin.rb:18:in >>> `get_app_properties' >>> from (irb):6 >>> from :0 >>> >> >>> >>> >>> but get an error ... >>> >>> do I need a JSON gem or something? >>> >>> Many thanks in advance >>> CHEERS> SAM >>> >>> Sam Joseph wrote: >>>> Hi There, >>>> >>>> I was wondering what the appropriate way to use the >>>> applicationproperties.rb model was. >>>> >>>> I was hoping to query it to find out which users are developers >>>> for my app and then grant special permissions to them ... >>>> >>>> I tried creating something like this: >>>> >>>> class ApplicationProperties < ActiveRecord::Base >>>> def facebook_session >>>> @facebook_session ||= >>>> returning Facebooker::Session.create do |session| >>>> session.secure_with! >>>> (session_key,User.find(:first).facebook_id,1.hour.from_now) >>>> end >>>> end >>>> end >>>> >>>> but that doesn't seem to help, i.e. the facebook session thing is >>>> specific to the user model .... >>>> >>>> Many thanks in advance >>>> CHEERS> SAM >>>> >>> >>> >>> -- >>> Sam Joseph, Ph.D. >>> Co-Director >>> Laboratory for Interactive Learning Technologies >>> Department of Information and Computer Sciences >>> University of Hawaii >>> >>> _______________________________________________ >>> Facebooker-talk mailing list >>> Facebooker-talk at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/facebooker-talk >> > > > -- > Sam Joseph, Ph.D. > Co-Director > Laboratory for Interactive Learning Technologies > Department of Information and Computer Sciences > University of Hawaii > From josh.m.sharpe at gmail.com Wed Dec 17 13:19:21 2008 From: josh.m.sharpe at gmail.com (Josh Sharpe) Date: Wed, 17 Dec 2008 13:19:21 -0500 Subject: [Facebooker-talk] pop up to request short/long story Message-ID: <6a7129610812171019g3f964333ma3579d49365d5377@mail.gmail.com> A new app allows one-line stories to be published automatically. So I assume that means that short/long stories need to be approved. Are there any tools in facebooker to do a lightbox popup to request permission for this? -------------- next part -------------- An HTML attachment was scrubbed... URL: From agiledevcool at gmail.com Wed Dec 17 17:36:09 2008 From: agiledevcool at gmail.com (Agile Dev) Date: Wed, 17 Dec 2008 17:36:09 -0500 Subject: [Facebooker-talk] Facebooker Scaffolding Not Working? Message-ID: Hey, I just setup a new app with the latest version of Facebooker, and I noticed that the scaffolding isn't working how it used to. It didn't generate an FBML version of the views or include the FBML format in the controller. FBML isn't included in the MIME type initializers either. I am using Rails 2.2.2. Please advise. Thanks, ADC -------------- next part -------------- An HTML attachment was scrubbed... URL: From jordanr at cs.washington.edu Thu Dec 18 10:59:51 2008 From: jordanr at cs.washington.edu (Richard Jordan) Date: Thu, 18 Dec 2008 07:59:51 -0800 (PST) Subject: [Facebooker-talk] Facebooker Scaffolding Not Working? In-Reply-To: References: Message-ID: Try script/generate facebook_scaffold ... And see other generators in $FACEBOOKER_ROOT/generators/*. Sincerely, Richard On Wed, 17 Dec 2008, Agile Dev wrote: > Hey, > I just setup a new app with the latest version of Facebooker, and I noticed > that the scaffolding isn't working how it used to. It didn't generate an > FBML version of the views or include the FBML format in the controller. > FBML isn't included in the MIME type initializers either. I am using Rails > 2.2.2. > > Please advise. > > Thanks, > ADC > From josh.m.sharpe at gmail.com Thu Dec 18 17:39:00 2008 From: josh.m.sharpe at gmail.com (Josh Sharpe) Date: Thu, 18 Dec 2008 17:39:00 -0500 Subject: [Facebooker-talk] form_remote_tag support Message-ID: <6a7129610812181439ubce06feob788ffb4f1c480ae@mail.gmail.com> When I added facebooker.js to my layout it breaks my form_remote_tag tag. It looks like the form isn't even getting submitted.. clicking does nothing. Do I have to use remote_form_for? -------------- next part -------------- An HTML attachment was scrubbed... URL: From mmangino at elevatedrails.com Fri Dec 19 09:21:12 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Fri, 19 Dec 2008 09:21:12 -0500 Subject: [Facebooker-talk] form_remote_tag support In-Reply-To: <6a7129610812181439ubce06feob788ffb4f1c480ae@mail.gmail.com> References: <6a7129610812181439ubce06feob788ffb4f1c480ae@mail.gmail.com> Message-ID: Do you get any javascript errors? The goal of Facebooker.js was to be a drop in replacement for the relevant Prototype functions, so it should work either way. Mike On Dec 18, 2008, at 5:39 PM, Josh Sharpe wrote: > When I added facebooker.js to my layout it breaks my form_remote_tag > tag. It looks like the form isn't even getting submitted.. clicking > does nothing. Do I have to use remote_form_for? > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk -- Mike Mangino http://www.elevatedrails.com From josh.m.sharpe at gmail.com Fri Dec 19 11:51:42 2008 From: josh.m.sharpe at gmail.com (Josh Sharpe) Date: Fri, 19 Dec 2008 11:51:42 -0500 Subject: [Facebooker-talk] form_remote_tag support In-Reply-To: References: <6a7129610812181439ubce06feob788ffb4f1c480ae@mail.gmail.com> Message-ID: <6a7129610812190851u75b06d8q3cde148ab58c9e19@mail.gmail.com> I had a relative url which I guess is a no no. It'd be nice if there were a warning for that -- I'd attempt a fix but my javascript knowledge outside of rails helpers is next to nil. On Fri, Dec 19, 2008 at 9:21 AM, Mike Mangino wrote: > Do you get any javascript errors? The goal of Facebooker.js was to be a > drop in replacement for the relevant Prototype functions, so it should work > either way. > > Mike > > On Dec 18, 2008, at 5:39 PM, Josh Sharpe wrote: > > When I added facebooker.js to my layout it breaks my form_remote_tag tag. >> It looks like the form isn't even getting submitted.. clicking does >> nothing. Do I have to use remote_form_for? >> _______________________________________________ >> 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 klochner at gmail.com Fri Dec 19 16:48:06 2008 From: klochner at gmail.com (kevin lochner) Date: Fri, 19 Dec 2008 16:48:06 -0500 Subject: [Facebooker-talk] session[:facebook_session] Message-ID: <49C1CD58-B9C0-428A-A718-D2C1921D4404@gmail.com> not sure if my prior message went through, given that I sent before confirming my membership to the list. Is anyone concerned with the practice of saving the entire fb session object in the session hash? I'm likely going to blow away all the "@var |= " statements and just use the api calls when I need to access data, since my understanding is that it's bad practice to store large objects in the session. From mmangino at elevatedrails.com Fri Dec 19 16:51:20 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Fri, 19 Dec 2008 16:51:20 -0500 Subject: [Facebooker-talk] session[:facebook_session] In-Reply-To: <49C1CD58-B9C0-428A-A718-D2C1921D4404@gmail.com> References: <49C1CD58-B9C0-428A-A718-D2C1921D4404@gmail.com> Message-ID: <7A44543F-0E1C-4297-A16E-C79F9A46F396@elevatedrails.com> The facebook session information is stored in the rails session by default. We serialize it to remove the cached objects and store just enough to recreate it. Mike On Dec 19, 2008, at 4:48 PM, kevin lochner wrote: > not sure if my prior message went through, given that I sent before > confirming my membership to the list. > > Is anyone concerned with the practice of saving the entire fb > session object in the session hash? I'm likely going to blow away > all the "@var |= " statements and just use the api calls when I need > to access data, since my understanding is that it's bad practice to > store large objects in the session. > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk -- Mike Mangino http://www.elevatedrails.com From chad at remesch.com Tue Dec 23 11:33:40 2008 From: chad at remesch.com (Chad Remesch) Date: Tue, 23 Dec 2008 11:33:40 -0500 Subject: [Facebooker-talk] Facebooker::Session::MissingOrInvalidParameter Message-ID: Does anyone know what causes the following... "A Facebooker::Session::MissingOrInvalidParameter occurred in home#index: Invalid parameter [RAILS_ROOT]/vendor/plugins/facebooker/lib/facebooker/parser.rb: 481:in `process'" Normally I see at most 1 or 2 of these a day, but as of today I'm seeing 1 to 3 of these per minute in my production application. Thank you, -Chad From stephane.akkaoui at imeuble.info Tue Dec 23 11:50:38 2008 From: stephane.akkaoui at imeuble.info (=?ISO-8859-1?Q?St=E9phane_Akkaoui?=) Date: Tue, 23 Dec 2008 17:50:38 +0100 Subject: [Facebooker-talk] Facebooker::Session::MissingOrInvalidParameter In-Reply-To: References: Message-ID: <8E4E72CE-531C-4DEE-A23F-DBF3180AA675@imeuble.info> Le 23 d?c. 08 ? 17:33, Chad Remesch a ?crit : > Does anyone know what causes the following... > > "A Facebooker::Session::MissingOrInvalidParameter occurred in > home#index: > Invalid parameter > [RAILS_ROOT]/vendor/plugins/facebooker/lib/facebooker/parser.rb: > 481:in `process'" > > Normally I see at most 1 or 2 of these a day, but as of today I'm > seeing 1 to 3 of these per minute in my production application. I've got the same... In the last hour, facebook seems to have been affected by technical problems. (I've experienced them myself). I hope it's linked. -- St?phane Akkaoui From garrett.johnson at 360oasis.com Sat Dec 27 22:08:18 2008 From: garrett.johnson at 360oasis.com (Garrett Johnson) Date: Sat, 27 Dec 2008 19:08:18 -0800 Subject: [Facebooker-talk] Events.create and users.Setstatus status? Message-ID: <605564b10812271908y69535ce9v2886ecce1cab6da7@mail.gmail.com> Is anyone currently working on or have an implementation of either Events.create or Users.setstatus. I'd rather not try to build it out if someone already has it. Thanks Garrett Johnson From stephane.akkaoui at imeuble.info Sun Dec 28 12:52:16 2008 From: stephane.akkaoui at imeuble.info (=?ISO-8859-1?Q?St=E9phane_Akkaoui?=) Date: Sun, 28 Dec 2008 18:52:16 +0100 Subject: [Facebooker-talk] Events.create and users.Setstatus status? In-Reply-To: <605564b10812271908y69535ce9v2886ecce1cab6da7@mail.gmail.com> References: <605564b10812271908y69535ce9v2886ecce1cab6da7@mail.gmail.com> Message-ID: Hi, I didn't work with Events.create. But for Users.setStatus, read this thread : http://rubyforge.org/pipermail/facebooker-talk/2008-December/001329.html If you still have issues with it, feel free to come back here. HTH, -- St?phane Akkaoui http://sociabliz.com http://imeuble.info Le 28 d?c. 08 ? 04:08, Garrett Johnson a ?crit : > Is anyone currently working on or have an implementation of either > Events.create or Users.setstatus. I'd rather not try to build it out > if someone already has it. > Thanks > Garrett Johnson > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk From klochner at gmail.com Mon Dec 29 14:01:46 2008 From: klochner at gmail.com (kevin lochner) Date: Mon, 29 Dec 2008 14:01:46 -0500 Subject: [Facebooker-talk] facebook login-button / fb-connect authentication Message-ID: <10D94B81-F99B-40C9-AD10-D119DD550E5C@gmail.com> Facebook seems to advocate pulling the session information from the cookies after the fbml login button gets clicked, e.g., step 8 here: http://wiki.developers.facebook.com/index.php/How_Connect_Authentication_Works I don't see any support for js+cookie authentication in facebooker, am i missing something or is facebooker just advocating restful authentication? - kevin From mmangino at elevatedrails.com Mon Dec 29 16:41:43 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Mon, 29 Dec 2008 16:41:43 -0500 Subject: [Facebooker-talk] facebook login-button / fb-connect authentication In-Reply-To: <10D94B81-F99B-40C9-AD10-D119DD550E5C@gmail.com> References: <10D94B81-F99B-40C9-AD10-D119DD550E5C@gmail.com> Message-ID: <1F573E67-976E-4AB8-9D05-2E51A77FAA7C@elevatedrails.com> We don't really support Facebook Connect yet. I heard from one person who got Cookie auth working, but I'm still waiting on patches. Mike On Dec 29, 2008, at 2:01 PM, kevin lochner wrote: > Facebook seems to advocate pulling the session information from the > cookies > after the fbml login button gets clicked, e.g., step 8 here: > > http://wiki.developers.facebook.com/index.php/How_Connect_Authentication_Works > > I don't see any support for js+cookie authentication in facebooker, > am i missing something > or is facebooker just advocating restful authentication? > > - kevin > > > > > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk -- Mike Mangino http://www.elevatedrails.com From rmatei at gmail.com Mon Dec 29 18:02:34 2008 From: rmatei at gmail.com (Robert Matei) Date: Mon, 29 Dec 2008 15:02:34 -0800 Subject: [Facebooker-talk] API calls = high CPU use? Message-ID: <31e3a0430812291502v445ff3ffpd2900348bd6ed47e@mail.gmail.com> I have some high-traffic apps whose CPU use is pretty consistently high. I think I'm seeing a connection between Facebooker API calls and that CPU use. My API calls send notifications and publish a feed; those calls make up the overwhelming majority of my wall clock time. But that shouldn't translate into high CPU use, right? Well, in a thoroughly unscientific test, I'm seeing about 33% lower CPU use without those calls. Is Facebooker going into a tight loop while waiting for a response or something to that effect? Any other tips to reduce CPU use in general? Robert -------------- next part -------------- An HTML attachment was scrubbed... URL: From mmangino at elevatedrails.com Mon Dec 29 19:29:08 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Mon, 29 Dec 2008 19:29:08 -0500 Subject: [Facebooker-talk] API calls = high CPU use? In-Reply-To: <31e3a0430812291502v445ff3ffpd2900348bd6ed47e@mail.gmail.com> References: <31e3a0430812291502v445ff3ffpd2900348bd6ed47e@mail.gmail.com> Message-ID: <8FFEF057-9301-4918-9F46-85BA4DE7878C@elevatedrails.com> There's no looping, but there is XML parsing. I wonder if there is an easy way to reduce the overhead of that. Does anyone remember what happened to the change to use libxml? we could alternatively use nokogiri if it is available. Mike On Dec 29, 2008, at 6:02 PM, Robert Matei wrote: > I have some high-traffic apps whose CPU use is pretty consistently > high. I think I'm seeing a connection between Facebooker API calls > and that CPU use. > > My API calls send notifications and publish a feed; those calls make > up the overwhelming majority of my wall clock time. But that > shouldn't translate into high CPU use, right? Well, in a thoroughly > unscientific test, I'm seeing about 33% lower CPU use without those > calls. > > Is Facebooker going into a tight loop while waiting for a response > or something to that effect? > Any other tips to reduce CPU use in general? > > Robert > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk -- Mike Mangino http://www.elevatedrails.com From alan.larkin at gmail.com Wed Dec 31 09:40:18 2008 From: alan.larkin at gmail.com (Alan Larkin) Date: Wed, 31 Dec 2008 14:40:18 +0000 Subject: [Facebooker-talk] e_a_i_i_b_f_u halting and redirecting to canvas Message-ID: <495B8452.90902@gmail.com> Hi all, I'd appreciate a little help getting the ball rolling here ... I'm trying to develop an IFrame app. When I visit my canvas page it renders fine. It contains a link: <%= link_to 'Edit', edit_team_url(1) %> If the user clicks that link they will need to have authorised the app so the TeamsController uses ensure_application_is_installed_by_facebook_user Now, if the app has not yet been authorised, the Facebook authorisation page appears, and after allowing the app, the user is redirected back to the canvas page (not forwarded on to the edit page as I would have liked). Further, if a user who has already authorised the app clicks the 'Edit' link, Facebook loads again inside the IFrame (so I have Facebook within Facebook) and displays the canvas page. The logs show the before filter is halting and then there is a redirect back to the canvas: Processing TeamsController#edit (for XX.XX.XXX.XXX at 2008-12-31 14:22:31) [GET] Session ID: XXXXXXXXXXXXXXXXXXXXXXXXXXX Parameters: {"id"=>"1"} Redirected to http://www.facebook.com/install.php?api_key=XXXXXXXXXXXXXXX&v=1.0 Filter chain halted as [:ensure_application_is_installed_by_facebook_user] rendered_or_redirected. Completed in 0ms (DB: 0) | 302 Found [http://XXXXXXXXXXX/teams/1/edit] Processing CanvassesController#show (for XX.XX.XXX.XXX at 2008-12-31 14:22:33) [GET] Session ID: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Parameters: {"fb_sig_time"=>"1230733218.5856", "fb_sig_in_iframe"=>"1", "fb_sig_in_new_facebook"=>"1", "fb_sig"=>"XXXXXXXXXXXXXXXX", "fb_sig_locale"=>"en_GB", "fb_sig_session_key"=>"XXXXXXXXXXXXXXXXXX", "auth_token"=>"XXXXXXXXXXXXXXXXXXXXX", "fb_sig_expires"=>"1230822000", "fb_sig_added"=>"1", "fb_sig_api_key"=>"XXXXXXXXXXXXXXXXXXXXXXXXXXX", "fb_sig_profile_update_time"=>"1222028229", "fb_sig_user"=>"XXXXXXX", "fb_sig_ss"=>"XXXXXXXXXXXXXXXX"} Rendering template within layouts/application Rendering canvasses/show Completed in 17ms (View: 15, DB: 0) | 200 OK Perhaps I have just configured the app incorrectly? Anyone got a clue for me? Thanks, Alan. -- Wikipedia Affiliate Button