From stephane.akkaoui at imeuble.info Sat Nov 1 09:30:21 2008 From: stephane.akkaoui at imeuble.info (=?ISO-8859-1?Q?St=E9phane_Akkaoui?=) Date: Sat, 1 Nov 2008 14:30:21 +0100 Subject: [Facebooker-talk] Friendship and cie Message-ID: Hi, I was adding a new feature in Facebooker : mutual_friends_between. A good usage could be to find mutual friends between a user_id and a logged in user : fb_session.mutual_friends_between(519798494, current_user) Of course, this method rely on the check_friendship method and the implementation in the parser of `facebook.friends.areFriends` API call. I wanted to know why does the parser sort ids when building the array of hashes ? memo[[Integer(hash['uid1']), Integer(hash['uid2'])].sort] = are_friends?(hash['are_friends']) ^^^^ It result that depending of the ids (which are totaly unpredictable), we are given with a randomly ordered list... For exemple, if facebook returns me : 105925 785637999 0 506773312 785637999 0 508625501 785637999 0 1233961883 785637999 1 1119061733 785637999 0 It will result : {[508625501, 785637999]=>false,[785637999, 1119061733]=>false, [105925, 785637999]=>false,[506773312, 785637999]=>false,[785637999, 1233961883]=>true} Here, uid2 is sometimes the first sometimes the second element even if Facebook return it always at the same place. It would be better to have it the same way facebook give it to us : {[508625501, 785637999]=>false,[1119061733, 785637999]=>false, [105925, 785637999]=>false,[506773312, 785637999]=>false,[1233961883, 785637999]=>true} So unless there is a good reason that i miss, i strongly suggest not to sort ids. What do you think ? In the same time, I have fixed the check_friendships method to allow it to compare multiple couples of ids. I think we should change tests to take unordered ids and improve the mock to take care of arguments. All this is commited in my fork of the facebooker git repository : git://github.com/meuble/facebooker.git -- St?phane Akkaoui http://www.sociabliz.com (fr) http://www.imeuble.info (fr) From dohe at hawaii.edu Sat Nov 1 22:29:07 2008 From: dohe at hawaii.edu (Kate Dohe) Date: Sat, 01 Nov 2008 16:29:07 -1000 Subject: [Facebooker-talk] Facebooker scaffolding errors Message-ID: <8F96E010-7A12-4F76-977D-FD89DBF2A51D@hawaii.edu> Hi everyone, My development team is using facebooker to develop a simple questionnaire for distribution via facebook, as part of a research project we're involved with. In order to store survey responses for research purposes, we elected to scaffold survey_responses and then work from there. As part of our setup, we modified routes.rb as follows: ActionController::Routing::Routes.draw do |map| map.resources :survey_responses, :conditions => {:canvas => true} # The priority is based upon order of creation: first created -> highest priority. ..... map.root :controller => "survey_responses", :action => 'new' Once we turned on the server and visited http://apps.facebook.com/stem_survey two errors surfaced in facebook: " urlexception unable to parse URL /http://apps.facebooker.com/stem_survey//survey_responses/new " and a second error related to fb:editor. Inside new.fmbl.erb: <% facebook_form_for(@survey_response) do |f| %> we changed to <% facebook_form_for(:survey_response, at survey_response,:url => '/ stem_survey/survey_responses/create', :labelwidth => '75', :width => '500') do |f| %> Which seemed to correct the fb:editor problems, but still caused incorrect url parsing upon creation of a survey record. To resolve this, we changed the survey_responses_controller to: respond_to do |format| if @survey_response.save flash[:notice] = 'SurveyResponse was successfully created.' format.html { redirect_to(@survey_response) } format.fbml { redirect_to('http://apps.facebook.com/stem_survey/survey_responses/'+ at survey_response.id.to_s) } format.xml { render :xml => @survey_response, :status => :created, :location => @survey_response } Is there a more elegant solution to using scaffolding in a facebooker- based application? Thanks in advance, ================= Kate Dohe HNLC Staff email: dohe at hawaii.edu cell phone: 417.773.4876 office: POST 309, University of Hawai'i at Manoa -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephane.akkaoui at imeuble.info Sun Nov 2 03:11:56 2008 From: stephane.akkaoui at imeuble.info (=?ISO-8859-1?Q?St=E9phane_Akkaoui?=) Date: Sun, 2 Nov 2008 09:11:56 +0100 Subject: [Facebooker-talk] Facebooker scaffolding errors In-Reply-To: <8F96E010-7A12-4F76-977D-FD89DBF2A51D@hawaii.edu> References: <8F96E010-7A12-4F76-977D-FD89DBF2A51D@hawaii.edu> Message-ID: Le 2 nov. 08 ? 03:29, Kate Dohe a ?crit : > Once we turned on the server and visited http://apps.facebook.com/stem_survey > two errors surfaced in facebook: > " urlexception unable to parse URL /http://apps.facebooker.com/stem_survey//survey_responses/new > " Did you correctly fill the Facebooker config file ? The canvas_page_name has to be the name of the application registered in facebook, without any trailing shlash. For you I guess it should be 'stem_survey'. > format.fbml { redirect_to('http://apps.facebook.com/stem_survey/survey_responses/'+ at survey_response.id.to_s) > } If the canvas_page_name field is correctly set, you should be able to do : redirect_to(@survey_response, :canvas => true) HTH, -- St?phane Akkaoui From schroeder.ken at gmail.com Sun Nov 2 16:23:06 2008 From: schroeder.ken at gmail.com (Ken Schroeder) Date: Sun, 2 Nov 2008 16:23:06 -0500 Subject: [Facebooker-talk] Facebook Users Message-ID: We are trying to write an app that has the ability to interface with more than 2 user platforms, i.e Facebook, My Space or Bebo and a 3rd Party Interface. I understand Facebook Connect has the ability to take user profiles and such to a 3rd Party application but if I wanted to try and write things in an iFrame how would I access Facebook User data or another sites User data? Thanks --ken -------------- next part -------------- An HTML attachment was scrubbed... URL: From srjoseph at hawaii.edu Mon Nov 3 15:35:31 2008 From: srjoseph at hawaii.edu (Sam Joseph) Date: Mon, 03 Nov 2008 10:35:31 -1000 Subject: [Facebooker-talk] Facebooker scaffolding errors In-Reply-To: References: <8F96E010-7A12-4F76-977D-FD89DBF2A51D@hawaii.edu> Message-ID: <490F6093.806@hawaii.edu> Hi Stephane St?phane Akkaoui wrote: > > Le 2 nov. 08 ? 03:29, Kate Dohe a ?crit : >> Once we turned on the server and visited >> http://apps.facebook.com/stem_survey two errors surfaced in facebook: >> " urlexception unable to parse URL >> /http://apps.facebooker.com/stem_survey//survey_responses/new" > > Did you correctly fill the Facebooker config file ? > The canvas_page_name has to be the name of the application registered > in facebook, without any trailing shlash. For you I guess it should be > 'stem_survey'. we removed the trailing slash: canvas_page_name: http://apps.facebook.com/stem_survey > >> format.fbml { >> redirect_to('http://apps.facebook.com/stem_survey/survey_responses/'+ at survey_response.id.to_s) } >> > > If the canvas_page_name field is correctly set, you should be able to > do : redirect_to(@survey_response, :canvas => true) Did that, but got this error: ArgumentError in Survey responsesController#create wrong number of arguments (2 for 1) RAILS_ROOT: /home/srjoseph/stem_survey Application Trace | Framework Trace | Full Trace vendor/plugins/facebooker/lib/facebooker/rails/controller.rb:154:in `fbml_redirect_tag' vendor/plugins/facebooker/lib/facebooker/rails/controller.rb:154:in `redirect_to' app/controllers/survey_responses_controller.rb:52:in `create' /var/lib/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/mime_responds.rb:131:in `call' /var/lib/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/mime_responds.rb:131:in `custom' /var/lib/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/mime_responds.rb:160:in `call' /var/lib/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/mime_responds.rb:160:in `respond' /var/lib/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/mime_responds.rb:154:in `each' /var/lib/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/mime_responds.rb:154:in `respond' /var/lib/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/mime_responds.rb:107:in `respond_to' app/controllers/survey_responses_controller.rb:48:in `create' /var/lib/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/base.rb:1166:in `send' /var/lib/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/base.rb:1166:in `perform_action_without_filters' /var/lib/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/filters.rb:579:in `call_filters' /var/lib/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/filters.rb:572:in `perform_action_without_benchmark' /var/lib/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue' /var/lib/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue' /var/lib/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/rescue.rb:201:in `perform_action_without_caching' /var/lib/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/caching/sql_cache.rb:13:in `perform_action' /var/lib/gems/1.8/gems/activerecord-2.1.1/lib/active_record/connection_adapters/abstract/query_cache.rb:33:in `cache' /var/lib/gems/1.8/gems/activerecord-2.1.1/lib/active_record/query_cache.rb:8:in `cache' /var/lib/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/caching/sql_cache.rb:12:in `perform_action' /var/lib/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/base.rb:529:in `send' /var/lib/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/base.rb:529:in `process_without_filters' /var/lib/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/filters.rb:568:in `process_without_session_management_support' /var/lib/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/session_management.rb:130:in `process' /var/lib/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/base.rb:389:in `process' /var/lib/gems/1.8/gems/activesupport-2.1.1/lib/active_support/dependencies.rb:503:in `load' /var/lib/gems/1.8/gems/activesupport-2.1.1/lib/active_support/dependencies.rb:503:in `load' /var/lib/gems/1.8/gems/activesupport-2.1.1/lib/active_support/dependencies.rb:355:in `new_constants_in' /var/lib/gems/1.8/gems/activesupport-2.1.1/lib/active_support/dependencies.rb:503:in `load' /var/lib/gems/1.8/gems/rails-2.1.1/lib/commands/servers/mongrel.rb:64 /var/lib/gems/1.8/gems/activesupport-2.1.1/lib/active_support/dependencies.rb:510:in `require' /var/lib/gems/1.8/gems/activesupport-2.1.1/lib/active_support/dependencies.rb:355:in `new_constants_in' /var/lib/gems/1.8/gems/activesupport-2.1.1/lib/active_support/dependencies.rb:510:in `require' /var/lib/gems/1.8/gems/rails-2.1.1/lib/commands/server.rb:39 Any ideas? 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 msummers at solarpowerme.com Wed Nov 5 16:09:20 2008 From: msummers at solarpowerme.com (Mike Summers) Date: Wed, 05 Nov 2008 15:09:20 -0600 Subject: [Facebooker-talk] FB Notify URLs and ensure_authenticated_to_facebook In-Reply-To: <69BDD071-1FF6-4725-894A-B617898ADEAD@bodaro.com> References: <69BDD071-1FF6-4725-894A-B617898ADEAD@bodaro.com> Message-ID: <49120B80.1020707@solarpowerme.com> An HTML attachment was scrubbed... URL: From mmangino at elevatedrails.com Wed Nov 5 16:36:27 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Wed, 5 Nov 2008 16:36:27 -0500 Subject: [Facebooker-talk] FB Notify URLs and ensure_authenticated_to_facebook In-Reply-To: <49120B80.1020707@solarpowerme.com> References: <69BDD071-1FF6-4725-894A-B617898ADEAD@bodaro.com> <49120B80.1020707@solarpowerme.com> Message-ID: <58897397-F07A-4C3F-9450-D3C4C1FF5482@elevatedrails.com> On Nov 5, 2008, at 4:09 PM, Mike Summers wrote: > Is there any resolution to this? I'm having a similar problem with > my post authorize controller method. > > If I don't use ensure_* there's no facebook_session, if I use > ensure_* I get redirected away :-( There is a set_facebook_session filter that will try to set the session without a redirect. Does that work for you? Mike > > > --Mike > -- Mike Mangino http://www.elevatedrails.com From msummers at solarpowerme.com Wed Nov 5 16:50:40 2008 From: msummers at solarpowerme.com (Mike Summers) Date: Wed, 05 Nov 2008 15:50:40 -0600 Subject: [Facebooker-talk] FB Notify URLs and ensure_authenticated_to_facebook In-Reply-To: <58897397-F07A-4C3F-9450-D3C4C1FF5482@elevatedrails.com> References: <69BDD071-1FF6-4725-894A-B617898ADEAD@bodaro.com> <49120B80.1020707@solarpowerme.com> <58897397-F07A-4C3F-9450-D3C4C1FF5482@elevatedrails.com> Message-ID: <49121530.2010001@solarpowerme.com> An HTML attachment was scrubbed... URL: From msummers at solarpowerme.com Wed Nov 5 17:37:44 2008 From: msummers at solarpowerme.com (Mike Summers) Date: Wed, 05 Nov 2008 16:37:44 -0600 Subject: [Facebooker-talk] FB Notify URLs and ensure_authenticated_to_facebook In-Reply-To: <49121530.2010001@solarpowerme.com> References: <69BDD071-1FF6-4725-894A-B617898ADEAD@bodaro.com> <49120B80.1020707@solarpowerme.com> <58897397-F07A-4C3F-9450-D3C4C1FF5482@elevatedrails.com> <49121530.2010001@solarpowerme.com> Message-ID: <49122038.2070104@solarpowerme.com> An HTML attachment was scrubbed... URL: From mmangino at elevatedrails.com Wed Nov 5 21:49:08 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Wed, 5 Nov 2008 21:49:08 -0500 Subject: [Facebooker-talk] FB Notify URLs and ensure_authenticated_to_facebook In-Reply-To: <49122038.2070104@solarpowerme.com> References: <69BDD071-1FF6-4725-894A-B617898ADEAD@bodaro.com> <49120B80.1020707@solarpowerme.com> <58897397-F07A-4C3F-9450-D3C4C1FF5482@elevatedrails.com> <49121530.2010001@solarpowerme.com> <49122038.2070104@solarpowerme.com> Message-ID: On Nov 5, 2008, at 5:37 PM, Mike Summers wrote: > Didn't work, most likely pilot error on my part. This is the code: > > class PostController < ApplicationController > include Facebooker::Rails::Controller > protect_from_forgery(:only => [:create, :update, :destroy]) > > def add > STDERR.puts("post.add") > STDERR.flush > redirect_to("#{AppRoot}") > end > > def remove > STDERR.puts("post.remove") > STDERR.flush > #redirect_to("#{AppRoot}") > end > > def authorize > result = set_facebook_session > STDERR.puts("post.authorize: set_facebook_session- > #{result.inspect}") > STDERR.flush > > EventPublisher > .deliver_authorize_event(session[:facebook_session].user) > redirect_to("#{AppRoot}") > end > end > > set_facebook_session is returning nil. The controller shows the full > compliment of fb_sig_* parameters, their values look good. > Sorry, try looking at the value of facebook_session after calling set_facebook_session. It is a filter that should make the facebook_session variables available. Mike > Am I including the Controller's code correctly? > > Thanks for the help. > > Mike Summers wrote: >> >> I'll give it a try and report back. >> >> Thanks! >> >> Mike Mangino wrote: >>> >>> >>> On Nov 5, 2008, at 4:09 PM, Mike Summers wrote: >>> >>>> Is there any resolution to this? I'm having a similar problem >>>> with my post authorize controller method. >>>> >>>> If I don't use ensure_* there's no facebook_session, if I use >>>> ensure_* I get redirected away :-( >>> >>> There is a set_facebook_session filter that will try to set the >>> session without a redirect. Does that work for you? >>> >>> Mike >>> >>>> >>>> >>>> --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 From msummers at solarpowerme.com Thu Nov 6 10:49:28 2008 From: msummers at solarpowerme.com (Mike Summers) Date: Thu, 06 Nov 2008 09:49:28 -0600 Subject: [Facebooker-talk] FB Notify URLs and ensure_authenticated_to_facebook In-Reply-To: References: <69BDD071-1FF6-4725-894A-B617898ADEAD@bodaro.com> <49120B80.1020707@solarpowerme.com> <58897397-F07A-4C3F-9450-D3C4C1FF5482@elevatedrails.com> <49121530.2010001@solarpowerme.com> <49122038.2070104@solarpowerme.com> Message-ID: <49131208.3050900@solarpowerme.com> An HTML attachment was scrubbed... URL: From mmangino at elevatedrails.com Thu Nov 6 14:06:57 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Thu, 6 Nov 2008 14:06:57 -0500 Subject: [Facebooker-talk] FB Notify URLs and ensure_authenticated_to_facebook In-Reply-To: <49131208.3050900@solarpowerme.com> References: <69BDD071-1FF6-4725-894A-B617898ADEAD@bodaro.com> <49120B80.1020707@solarpowerme.com> <58897397-F07A-4C3F-9450-D3C4C1FF5482@elevatedrails.com> <49121530.2010001@solarpowerme.com> <49122038.2070104@solarpowerme.com> <49131208.3050900@solarpowerme.com> Message-ID: <1DBB9F25-F981-4515-B51A-6F18E3B0CB62@elevatedrails.com> What do the parameters look like? Mike On Nov 6, 2008, at 10:49 AM, Mike Summers wrote: > facebook_session is null after calling set_facebook_session. > > It looks like set_facebook_session is running into this: > def secure_with_token! > if params['auth_token'] > @facebook_session = new_facebook_session > @facebook_session.auth_token = params['auth_token'] > @facebook_session.secure! > session[:facebook_session] = @facebook_session > end > end > > There is no 'auth_token' in params, would this be due to our coming > here from FB's 'Allow Access?' page? > > Mike Mangino wrote: >> >> >> On Nov 5, 2008, at 5:37 PM, Mike Summers wrote: >> >>> Didn't work, most likely pilot error on my part. This is the code: >>> >>> class PostController < ApplicationController >>> include Facebooker::Rails::Controller >>> protect_from_forgery(:only => [:create, :update, :destroy]) >>> >>> def add >>> STDERR.puts("post.add") >>> STDERR.flush >>> redirect_to("#{AppRoot}") >>> end >>> >>> def remove >>> STDERR.puts("post.remove") >>> STDERR.flush >>> #redirect_to("#{AppRoot}") >>> end >>> >>> def authorize >>> result = set_facebook_session >>> STDERR.puts("post.authorize: set_facebook_session- >>> #{result.inspect}") >>> STDERR.flush >>> >>> EventPublisher >>> .deliver_authorize_event(session[:facebook_session].user) >>> redirect_to("#{AppRoot}") >>> end >>> end >>> >>> set_facebook_session is returning nil. The controller shows the >>> full compliment of fb_sig_* parameters, their values look good. >>> >> >> Sorry, try looking at the value of facebook_session after calling >> set_facebook_session. It is a filter that should make the >> facebook_session variables available. >> >> Mike >> >> >>> Am I including the Controller's code correctly? >>> >>> Thanks for the help. >>> >>> Mike Summers wrote: >>>> >>>> I'll give it a try and report back. >>>> >>>> Thanks! >>>> >>>> Mike Mangino wrote: >>>>> >>>>> >>>>> On Nov 5, 2008, at 4:09 PM, Mike Summers wrote: >>>>> >>>>>> Is there any resolution to this? I'm having a similar problem >>>>>> with my post authorize controller method. >>>>>> >>>>>> If I don't use ensure_* there's no facebook_session, if I use >>>>>> ensure_* I get redirected away :-( >>>>> >>>>> There is a set_facebook_session filter that will try to set the >>>>> session without a redirect. Does that work for you? >>>>> >>>>> Mike >>>>> >>>>>> >>>>>> >>>>>> --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 >> >> >> >> -- Mike Mangino http://www.elevatedrails.com From stephane.akkaoui at imeuble.info Fri Nov 7 07:13:19 2008 From: stephane.akkaoui at imeuble.info (=?ISO-8859-1?Q?St=E9phane_Akkaoui?=) Date: Fri, 7 Nov 2008 13:13:19 +0100 Subject: [Facebooker-talk] Facebooker scaffolding errors In-Reply-To: <490F6093.806@hawaii.edu> References: <8F96E010-7A12-4F76-977D-FD89DBF2A51D@hawaii.edu> <490F6093.806@hawaii.edu> Message-ID: Hi Sam, Soory for the delay... you may have fix your problem now. But still, i give you some answers, they could be interesting for others to. Le 3 nov. 08 ? 21:35, Sam Joseph a ?crit : > we removed the trailing slash: > canvas_page_name: http://apps.facebook.com/stem_survey The canvas page name is not an url. It's juste a name. As I told you before, for your app, it's : canvas_page_name: stem_survey >>> format.fbml { redirect_to('http://apps.facebook.com/stem_survey/survey_responses/'+ at survey_response.id.to_s) >>> } >> >> If the canvas_page_name field is correctly set, you should be able >> to do : redirect_to(@survey_response, :canvas => true) > Did that, but got this error: > > ArgumentError in Survey responsesController#create > > wrong number of arguments (2 for 1) Here is an example : # in config/root.rb map.resources :messages # in script/console >> app.messages_url() => "http://www.example.com/messages" >> app.messages_url(:canvas => true) => "http://apps.new.facebook.com/alisterapptrois/messages" >> @message = Message.find(:first) => # >> app.message_url(@message, :canvas => true) => "http://apps.new.facebook.com/canvas_page_name/messages/29" >> app.message_url(@message, :canvas => false) => "http://www.example.com/messages/29" >> app.message_url(@message) => "http://www.example.com/messages/29" # in app/controller/hello_controller def foo @message = Message.find(:first) redirect_to( message_url(@message, :canvas => true)) end # in script/server (logs after calling http://localhost:3000/hello/toto) Processing HelloController#toto (for 127.0.0.1 at 2008-11-07 13:03:53) [GET] Session ID: 3c6050ab0cfc62d75ddc7a1441792271 Parameters: {"action"=>"toto", "controller"=>"hello"} Message Load (0.000276) SELECT * FROM `messages` LIMIT 1 Message Columns (0.002220) SHOW FIELDS FROM `messages` Redirected to http://apps.new.facebook.com/canvas_page_name/messages/29 Completed in 0.00896 (111 reqs/sec) | DB: 0.00312 (34%) | 302 Found [http://localhost/hello/toto ] # in app/controller/hello_controller def foo @message = Message.find(:first) redirect_to( message_url(@message)) end # in script/server (logs after calling http://localhost:3000/hello/toto) Processing HelloController#toto (for 127.0.0.1 at 2008-11-07 13:03:08) [GET] Session ID: 3c6050ab0cfc62d75ddc7a1441792271 Parameters: {"action"=>"toto", "controller"=>"hello"} Message Load (0.000266) SELECT * FROM `messages` LIMIT 1 Message Columns (0.001918) SHOW FIELDS FROM `messages` Redirected to http://localhost:3000/messages/29 Completed in 0.01750 (57 reqs/sec) | DB: 0.00615 (35%) | 302 Found [http://localhost/hello/toto ] HTH, -- St?phane Akkaoui http://www.sociabliz.com (fr) http://imeuble.info (fr) From josephdurden at gmail.com Mon Nov 10 18:21:58 2008 From: josephdurden at gmail.com (Joseph Durden) Date: Mon, 10 Nov 2008 15:21:58 -0800 Subject: [Facebooker-talk] Unusual Bebo invitations occurances??? Message-ID: hello, I am using the updated facebooker with bebo support. I am running into problems though using invitations with bebo. The problems I am running into with bebo, when using the invitations new controller action with the invitations/new.fbml.erb, and inside the new.fbml.erb file, calling invitations_url within the fb_multi_friend_request does not recognize when to call the invitations index action when pressing skip. Instead when pressing skip, it calls the invitations/create action which causes errors. here is the code I am using, and I should note it is from the Developing facebook platform development with rails book. class InvitationsController < PilotController def index redirect_to root_url end def new if params[:from] @sent_from_id = params[:from] @user = facebook_session.user @user.profile_fbml = render_to_string(:partial=>"profile" , :locals=>{:from=>params[:from]}) end @from_user_id = facebook_session.user.to_s end def create @sent_to_ids = params[:ids] end end app/views/invitations/new.fbml.erb <% fb_multi_friend_request("Test this app" , "Invite your friends to test this app" , invitations_url) do %> Test this app with your friends! <%= fb_req_choice("Test this app!" , root_url(:from=>@from_user_id, :canvas=>true))%> <% end %> app/views/invitations/create.fbml.erb <% for id in @sent_to_ids%> <%= fb_profile_pic id %> <%= fb_name id %>
<% end %> app/views/invitations/_profile.fbml.erb <% if @sent_from_id %> I was sent here by
<% end %> I am
The following errors exist when following this flow of events: After navigating to invitations/new and pressing skip, for some reason bebo tries to call the create method and tries to set @sent_to_ids, even though it should be recognizing the index action. When performing this in facebook, everything works as expected and after clicking skip, the user is redirected to the invitations index action. Here are the errors when doing this in bebo: NoMethodError in Invitations#create Showing invitations/create.fbml.erb where line #1 raised: You have a nil object when you didn't expect it! You might have expected an instance of Array. The error occurred while evaluating nil.each Extracted source (around line #1): 1: <% for id in @sent_to_ids%> 2: <= fb_profile_pic id %> <= fb_name id > 3: < end %> ?-?-?-?-?-? I am also receiving problems during this flow of events as well. Navigate to the invite page, select users to invite, followed by deselecting all of the users, then clicking skip. When the skip action is performed, for some reason the params[:ids] have been stored and the create action is called, showing the create.fbml.erb page with a list of users that have been selected, even though skip was called. The invitation is not sent though. Basically pressing skip in bebo calls the create action and stores any selected and deselected users in the @sent_to_ids variable, even though it should be calling the index action. What is the best way to handle this inconsistency so pressing skip works as expected when using bebo, so it recognizes that skip should route to invitations/index action? Is there another api call rather than the fb_multi_friend_request where I could explicitly define when pressing skip, or pressing invite? How have others handled this? -------------- next part -------------- An HTML attachment was scrubbed... URL: From waratuman86 at gmail.com Tue Nov 11 00:56:53 2008 From: waratuman86 at gmail.com (James Bracy) Date: Mon, 10 Nov 2008 23:56:53 -0600 Subject: [Facebooker-talk] tesing controllers Message-ID: <79488bcf0811102156r7af2f81k21e2f4b49fb43d6e@mail.gmail.com> Hey, I'm trying to set up some test for a few controllers but I'm running into a error while testing. The tes is as follows: def test_index facebook_get :index assert_response :success assert_template 'index' end And the error that I get comes from the 'facebook_get :index' and is: Facebooker::Session::SessionExpired: Session key invalid or no longer valid Any ideas? Thanks, James -------------- next part -------------- An HTML attachment was scrubbed... URL: From josephdurden at gmail.com Tue Nov 11 04:36:22 2008 From: josephdurden at gmail.com (Joseph Durden) Date: Tue, 11 Nov 2008 01:36:22 -0800 Subject: [Facebooker-talk] Overriding id with facebook_id??? Message-ID: I am new to rails, and was wondering if there would be unknown consequences for setting the user tables primary key to being the facebook_id of a user. I have implemented this funcionality, and everything is working fine. All associations etc. What are the risks if there are any of overridding the id with facebook_id? Why would I not want to do this? I did this because, it seems easier to look up a user by their facebook id rather than their id to get their facebook id in associated table. Meaning if I have an association with a user has_many comments, and the comments has a user_id column. I think it is easiers looking up things with facebook_ids rather than ids, as these can get confusing. just one less thing to worry about. Does it matter what the order of insertions to the database for creating new Users? Any insight would be wonderful. Graciously, Joe -------------- next part -------------- An HTML attachment was scrubbed... URL: From mmangino at elevatedrails.com Tue Nov 11 11:15:45 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Tue, 11 Nov 2008 11:15:45 -0500 Subject: [Facebooker-talk] Overriding id with facebook_id??? In-Reply-To: References: Message-ID: <7CC7234F-8DFF-4E5E-B169-DC49C25F7E1D@elevatedrails.com> On Nov 11, 2008, at 4:36 AM, Joseph Durden wrote: > I am new to rails, and was wondering if there would be unknown > consequences for setting the user tables primary key to being the > facebook_id of a user. I have implemented this funcionality, and > everything is working fine. All associations etc. What are the > risks if there are any of overridding the id with facebook_id? Why > would I not want to do this? I did this because, it seems easier to > look up a user by their facebook id rather than their id to get > their facebook id in associated table. Meaning if I have an > association with a user has_many comments, and the comments has a > user_id column. I think it is easiers looking up things with > facebook_ids rather than ids, as these can get confusing. just one > less thing to worry about. The typical reason for using a surrogate key is to guard against changes. In this case, there is a very low probability that Facebook will change the id of a user, so that's not a big deal. What might be a bigger deal is supporting other platforms. If you choose to use the facebook_id as the primary key, what would happen if you wanted to add BEBO support? Mike > > > Does it matter what the order of insertions to the database for > creating new Users? > > Any insight would be wonderful. > > Graciously, > > Joe > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk -- Mike Mangino http://www.elevatedrails.com From digidigo at gmail.com Tue Nov 11 11:29:31 2008 From: digidigo at gmail.com (David Clements) Date: Tue, 11 Nov 2008 09:29:31 -0700 Subject: [Facebooker-talk] Unusual Bebo invitations occurances??? In-Reply-To: References: Message-ID: Not sure if this will help but I have had to special case the invite page. I am not remembering why but I have this code. " I am running on facebook and bebo. Dave On Mon, Nov 10, 2008 at 4:21 PM, Joseph Durden wrote: > hello, > > I am using the updated facebooker with bebo support. I am running into > problems though using invitations with bebo. The problems I am running into > with bebo, when using the invitations new controller action with the > invitations/new.fbml.erb, and inside the new.fbml.erb file, calling > invitations_url within the fb_multi_friend_request does not recognize when > to call the invitations index action when pressing skip. Instead when > pressing skip, it calls the invitations/create action which causes errors. > here is the code I am using, and I should note it is from the Developing > facebook platform development with rails book. > > class InvitationsController < PilotController > > def index > redirect_to root_url > end > > def new > if params[:from] > @sent_from_id = params[:from] > @user = facebook_session.user > @user.profile_fbml = render_to_string(:partial=>"profile" , > :locals=>{:from=>params[:from]}) > end > @from_user_id = facebook_session.user.to_s > end > > def create > @sent_to_ids = params[:ids] > end > end > app/views/invitations/new.fbml.erb > > <% fb_multi_friend_request("Test this app" , > "Invite your friends to test this app" , > invitations_url) do %> > Test this app with your friends! > <%= fb_req_choice("Test this app!" , > root_url(:from=>@from_user_id, :canvas=>true))%> > <% end %> > > app/views/invitations/create.fbml.erb > > <% for id in @sent_to_ids%> > <%= fb_profile_pic id %> <%= fb_name id %>
> <% end %> > > app/views/invitations/_profile.fbml.erb > <% if @sent_from_id %> > I was sent here by
> <% end %> > I am
> > The following errors exist when following this flow of events: After > navigating to invitations/new and pressing skip, for some reason bebo tries > to call the create method and tries to set @sent_to_ids, even though it > should be recognizing the index action. When performing this in facebook, > everything works as expected and after clicking skip, the user is redirected > to the invitations index action. Here are the errors when doing this in > bebo: > > NoMethodError in Invitations#create > > Showing invitations/create.fbml.erb where line #1 raised: > > You have a nil object when you didn't expect it! > You might have expected an instance of Array. > The error occurred while evaluating nil.each > > Extracted source (around line #1): > > 1: <% for id in @sent_to_ids%> > 2: <= fb_profile_pic id %> <= fb_name id > > 3: < end %> > > ?-?-?-?-?-? > > I am also receiving problems during this flow of events as well. Navigate > to the invite page, select users to invite, followed by deselecting all of > the users, then clicking skip. When the skip action is performed, for some > reason the params[:ids] have been stored and the create action is called, > showing the create.fbml.erb page with a list of users that have been > selected, even though skip was called. The invitation is not sent though. > > Basically pressing skip in bebo calls the create action and stores any > selected and deselected users in the @sent_to_ids variable, even though it > should be calling the index action. > > What is the best way to handle this inconsistency so pressing skip works as > expected when using bebo, so it recognizes that skip should route to > invitations/index action? Is there another api call rather than the > fb_multi_friend_request where I could explicitly define when pressing skip, > or pressing invite? How have others handled 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 mmangino at elevatedrails.com Tue Nov 11 12:25:03 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Tue, 11 Nov 2008 12:25:03 -0500 Subject: [Facebooker-talk] tesing controllers In-Reply-To: <79488bcf0811102156r7af2f81k21e2f4b49fb43d6e@mail.gmail.com> References: <79488bcf0811102156r7af2f81k21e2f4b49fb43d6e@mail.gmail.com> Message-ID: <76C7546C-6B0D-46F2-B87E-E095EA618DEA@elevatedrails.com> On Nov 11, 2008, at 12:56 AM, James Bracy wrote: > Hey, > > I'm trying to set up some test for a few controllers but I'm running > into a error while testing. The tes is as follows: > > def test_index > facebook_get :index > assert_response :success > assert_template 'index' > end > > And the error that I get comes from the 'facebook_get :index' and is: > > Facebooker::Session::SessionExpired: Session key invalid or no > longer valid If you are doing anything that involves the API, you might get the error. What does the stack trace look like? Mike > > > Any ideas? > > Thanks, > James > _______________________________________________ > 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 Nov 11 12:30:49 2008 From: mixonic at synitech.com (Matthew Beale) Date: Tue, 11 Nov 2008 12:30:49 -0500 Subject: [Facebooker-talk] Facebooker config goes away in production Message-ID: <1226424649.8707.16.camel@localhost> Hi all, I've been having some issues with facebooker in production. The server is a CentOs box with thin v1.0.0, ruby v1.8.6-287 & frozen rails 2.1.2. I just updated to the latest rev of facebooker this morning (for action_links, nice), but we've been pretty up to date even before now. Is anyone else deployed on a similar setup? The bug is facebooker's configuration goes away. This usually happens after a few hours of being up. The only theory I have right now is that thin is reloading classes after they get "stale" and overwriting configuration data. It looks like the "Facebooker" constant itself becomes a hash (see the last exception below). Sometimes this results in a literal config missing error: ------------- Facebooker::Session::ConfigurationMissing: Could not find configuration information for secret vendor/plugins/facebooker/lib/facebooker/session.rb, line 529 vendor/plugins/facebooker/lib/facebooker/session.rb:529:in `report_inability_to_find_key' vendor/plugins/facebooker/lib/facebooker/session.rb:77:in `secret_key' vendor/plugins/facebooker/lib/facebooker/rails/controller.rb:154:in `verify_signature' vendor/plugins/facebooker/lib/facebooker/rails/controller.rb:140:in `verified_facebook_params' vendor/plugins/facebooker/lib/facebooker/rails/controller.rb:50:in `facebook_params' vendor/plugins/facebooker/lib/facebooker/rails/controller.rb:78:in `valid_session_key_in_session?' vendor/plugins/facebooker/lib/facebooker/rails/controller.rb:56:in `session_already_secured?' vendor/plugins/facebooker/lib/facebooker/rails/controller.rb:26:in `set_facebook_session' vendor/plugins/facebooker/lib/facebooker/rails/controller.rb:224:in `ensure_authenticated_to_facebook' vendor/plugins/facebooker/lib/facebooker/rails/controller.rb:229:in `ensure_application_is_installed_by_facebook_user' ---------- and sometimes in a variety of other exceptions: ------------ NoMethodError: undefined method `is_for?' for # vendor/plugins/facebooker/lib/facebooker.rb, line 102 vendor/plugins/facebooker/lib/facebooker.rb:102:in `is_for?' vendor/plugins/facebooker/lib/facebooker/adapters/bebo_adapter.rb:52:in `collect' vendor/plugins/facebooker/lib/facebooker/models/user.rb:112:in `populate' vendor/plugins/facebooker/lib/facebooker/model.rb:35:in `uid' ------------ ---------- NoMethodError: undefined method `api_key' for # vendor/plugins/facebooker/lib/facebooker.rb, line 108 vendor/plugins/facebooker/lib/facebooker.rb:108:in `send' vendor/plugins/facebooker/lib/facebooker.rb:108:in `api_key' vendor/plugins/facebooker/lib/facebooker/rails/controller.rb:115:in `new_facebook_session' ----------- Mike or David, does it make sense that reloading the facebooker classes would blow away the config? -- Matthew Beale :: 607 227 0871 Resume & Portfolio @ http://madhatted.com From lee at crossbonesystems.com Tue Nov 11 13:08:03 2008 From: lee at crossbonesystems.com (Lee Mallabone) Date: Tue, 11 Nov 2008 18:08:03 +0000 Subject: [Facebooker-talk] Overriding id with facebook_id??? In-Reply-To: References: Message-ID: 2008/11/11 Joseph Durden : > I am new to rails, and was wondering if there would be unknown consequences > for setting the user tables primary key to being the facebook_id of a user. > I have implemented this funcionality, and everything is working fine. All > associations etc. What are the risks if there are any of overridding the id > with facebook_id? Why would I not want to do this? I'm doing this at the moment. The biggest thing I was concerned about was the potential for facebook user IDs to be 64bit numbers. (I can't remember the official Facebook stance on ID size but I'm pretty sure they weren't ruling out 64bit IDs). Rails migrations don't seem to support 64bit values (on mysql at least) out-of-the-box. I worked around the issue by patching ActiveRecord. I added a snippet (attached) to environment.rb based on the following post and all seems fine to date: http://snippets.dzone.com/posts/show/4422 Use column type :int64_pk for your users table and :int64 for any foreign key columns. Lee. -- Lee Mallabone. Director, Crossbone Systems Ltd. http://www.crossbonesystems.com/ http://www.fonicmonkey.net/ http://CambridgeWebHeads.ning.com/ -------------- next part -------------- A non-text attachment was scrubbed... Name: mysql-64bit-monkeypatch.rb Type: text/x-ruby-script Size: 1097 bytes Desc: not available URL: From mmangino at elevatedrails.com Tue Nov 11 13:16:51 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Tue, 11 Nov 2008 13:16:51 -0500 Subject: [Facebooker-talk] Overriding id with facebook_id??? In-Reply-To: References: Message-ID: On Nov 11, 2008, at 1:08 PM, Lee Mallabone wrote: > 2008/11/11 Joseph Durden : >> I am new to rails, and was wondering if there would be unknown >> consequences >> for setting the user tables primary key to being the facebook_id of >> a user. >> I have implemented this funcionality, and everything is working >> fine. All >> associations etc. What are the risks if there are any of >> overridding the id >> with facebook_id? Why would I not want to do this? > > I'm doing this at the moment. The biggest thing I was concerned about > was the potential for facebook user IDs to be 64bit numbers. (I can't > remember the official Facebook stance on ID size but I'm pretty sure > they weren't ruling out 64bit IDs). Rails migrations don't seem to > support 64bit values (on mysql at least) out-of-the-box. > > I worked around the issue by patching ActiveRecord. I added a snippet > (attached) to environment.rb based on the following post and all seems > fine to date: > http://snippets.dzone.com/posts/show/4422 > > Use column type :int64_pk for your users table and :int64 for any > foreign key columns. > For Mysql, just use :integer, :limit=>21 That forces the use of bigints. Facebook is using 64bit user ids. Mike > Lee. > > > > -- > Lee Mallabone. > Director, Crossbone Systems Ltd. > > http://www.crossbonesystems.com/ > http://www.fonicmonkey.net/ > http://CambridgeWebHeads.ning.com/ > monkeypatch.rb>_______________________________________________ > 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 Nov 11 13:19:30 2008 From: tres.wong-godfrey at saniq.com (Tres Wong-Godfrey) Date: Tue, 11 Nov 2008 10:19:30 -0800 Subject: [Facebooker-talk] Overriding id with facebook_id??? In-Reply-To: References: Message-ID: <03C9374D-B017-48F1-B47F-080BDD63C162@saniq.com> As of Rails 2.1 64 bit ints are supported in MySQL migrations. Formerly you needed to use a plugin to get this working in MySQL. Rails 2.1.0 had some problems with the implementation, but in 2.1.1 I believe they have fixed the implementation to work the same as Postgres, so using :limit => 8 gets you bigint in mysql. So something like this, should work under Rails 2.1.1 with no patching or plugins necessary: t.integer :facebook_id, :limit => 8, :null=> false On Nov 11, 2008, at 10:08 AM, Lee Mallabone wrote: > 2008/11/11 Joseph Durden : >> I am new to rails, and was wondering if there would be unknown >> consequences >> for setting the user tables primary key to being the facebook_id of >> a user. >> I have implemented this funcionality, and everything is working >> fine. All >> associations etc. What are the risks if there are any of >> overridding the id >> with facebook_id? Why would I not want to do this? > > I'm doing this at the moment. The biggest thing I was concerned about > was the potential for facebook user IDs to be 64bit numbers. (I can't > remember the official Facebook stance on ID size but I'm pretty sure > they weren't ruling out 64bit IDs). Rails migrations don't seem to > support 64bit values (on mysql at least) out-of-the-box. > > I worked around the issue by patching ActiveRecord. I added a snippet > (attached) to environment.rb based on the following post and all seems > fine to date: > http://snippets.dzone.com/posts/show/4422 > > Use column type :int64_pk for your users table and :int64 for any > foreign key columns. > > Lee. > > > > -- > Lee Mallabone. > Director, Crossbone Systems Ltd. > > http://www.crossbonesystems.com/ > http://www.fonicmonkey.net/ > http://CambridgeWebHeads.ning.com/ > monkeypatch.rb>_______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk From aeon2012 at gmail.com Tue Nov 11 13:39:07 2008 From: aeon2012 at gmail.com (Anthony C. Eufemio) Date: Tue, 11 Nov 2008 10:39:07 -0800 Subject: [Facebooker-talk] Overriding id with facebook_id??? In-Reply-To: <03C9374D-B017-48F1-B47F-080BDD63C162@saniq.com> References: <03C9374D-B017-48F1-B47F-080BDD63C162@saniq.com> Message-ID: You'll also need to handle the fact that ids in Rails are automatically incremented so when a user uninstalls the app you won't be able to remove their account (perhaps just mark it as 'disabled' in your application or some similar approach) so when they decide to re-install the app all you have to do is set it to 'enabled' -AE On Tue, Nov 11, 2008 at 10:19 AM, Tres Wong-Godfrey < tres.wong-godfrey at saniq.com> wrote: > > As of Rails 2.1 64 bit ints are supported in MySQL migrations. Formerly you > needed to use a plugin to get this working in MySQL. > > Rails 2.1.0 had some problems with the implementation, but in 2.1.1 I > believe they have fixed the implementation to work the same as Postgres, so > using :limit => 8 gets you bigint in mysql. > > So something like this, should work under Rails 2.1.1 with no patching or > plugins necessary: > t.integer :facebook_id, :limit => 8, :null=> false > > > > > On Nov 11, 2008, at 10:08 AM, Lee Mallabone wrote: > > 2008/11/11 Joseph Durden : >> >>> I am new to rails, and was wondering if there would be unknown >>> consequences >>> for setting the user tables primary key to being the facebook_id of a >>> user. >>> I have implemented this funcionality, and everything is working fine. >>> All >>> associations etc. What are the risks if there are any of overridding the >>> id >>> with facebook_id? Why would I not want to do this? >>> >> >> I'm doing this at the moment. The biggest thing I was concerned about >> was the potential for facebook user IDs to be 64bit numbers. (I can't >> remember the official Facebook stance on ID size but I'm pretty sure >> they weren't ruling out 64bit IDs). Rails migrations don't seem to >> support 64bit values (on mysql at least) out-of-the-box. >> >> I worked around the issue by patching ActiveRecord. I added a snippet >> (attached) to environment.rb based on the following post and all seems >> fine to date: >> http://snippets.dzone.com/posts/show/4422 >> >> Use column type :int64_pk for your users table and :int64 for any >> foreign key columns. >> >> Lee. >> >> >> >> -- >> Lee Mallabone. >> Director, Crossbone Systems Ltd. >> >> http://www.crossbonesystems.com/ >> http://www.fonicmonkey.net/ >> http://CambridgeWebHeads.ning.com/ >> >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/facebooker-talk >> > > _______________________________________________ > 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 Tue Nov 11 14:50:56 2008 From: lee at crossbonesystems.com (Lee Mallabone) Date: Tue, 11 Nov 2008 19:50:56 +0000 Subject: [Facebooker-talk] Overriding id with facebook_id??? In-Reply-To: References: <03C9374D-B017-48F1-B47F-080BDD63C162@saniq.com> Message-ID: I use this migration (which makes use of the environment patch I posted previously) to ensure you don't get auto-incrementing IDs. They wouldn't make much sense when facebook are providing the ID! create_table :users, :id => false do |t| t.column :id, :int64_pk, :null => false # the facebook uid t.column :created_at, :datetime t.column :last_seen, :datetime end Lee. 2008/11/11 Anthony C. Eufemio : > You'll also need to handle the fact that ids in Rails are automatically > incremented so when a user uninstalls the app you won't be able to remove > their account (perhaps just mark it as 'disabled' in your application or > some similar approach) so when they decide to re-install the app all you > have to do is set it to 'enabled' > > > > -AE > > On Tue, Nov 11, 2008 at 10:19 AM, Tres Wong-Godfrey > wrote: >> >> As of Rails 2.1 64 bit ints are supported in MySQL migrations. Formerly >> you needed to use a plugin to get this working in MySQL. >> >> Rails 2.1.0 had some problems with the implementation, but in 2.1.1 I >> believe they have fixed the implementation to work the same as Postgres, so >> using :limit => 8 gets you bigint in mysql. >> >> So something like this, should work under Rails 2.1.1 with no patching or >> plugins necessary: >> t.integer :facebook_id, :limit => 8, :null=> false >> >> >> >> On Nov 11, 2008, at 10:08 AM, Lee Mallabone wrote: >> >>> 2008/11/11 Joseph Durden : >>>> >>>> I am new to rails, and was wondering if there would be unknown >>>> consequences >>>> for setting the user tables primary key to being the facebook_id of a >>>> user. >>>> I have implemented this funcionality, and everything is working fine. >>>> All >>>> associations etc. What are the risks if there are any of overridding >>>> the id >>>> with facebook_id? Why would I not want to do this? >>> >>> I'm doing this at the moment. The biggest thing I was concerned about >>> was the potential for facebook user IDs to be 64bit numbers. (I can't >>> remember the official Facebook stance on ID size but I'm pretty sure >>> they weren't ruling out 64bit IDs). Rails migrations don't seem to >>> support 64bit values (on mysql at least) out-of-the-box. >>> >>> I worked around the issue by patching ActiveRecord. I added a snippet >>> (attached) to environment.rb based on the following post and all seems >>> fine to date: >>> http://snippets.dzone.com/posts/show/4422 >>> >>> Use column type :int64_pk for your users table and :int64 for any >>> foreign key columns. >>> >>> Lee. >>> >>> >>> >>> -- >>> Lee Mallabone. >>> Director, Crossbone Systems Ltd. >>> >>> http://www.crossbonesystems.com/ >>> http://www.fonicmonkey.net/ >>> http://CambridgeWebHeads.ning.com/ >>> >>> _______________________________________________ >>> Facebooker-talk mailing list >>> Facebooker-talk at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/facebooker-talk >> >> _______________________________________________ >> 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 > > -- Lee Mallabone. Director, Crossbone Systems Ltd. http://www.crossbonesystems.com/ http://www.fonicmonkey.net/ http://CambridgeWebHeads.ning.com/ From mmangino at elevatedrails.com Tue Nov 11 15:29:32 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Tue, 11 Nov 2008 15:29:32 -0500 Subject: [Facebooker-talk] Overriding id with facebook_id??? In-Reply-To: References: <03C9374D-B017-48F1-B47F-080BDD63C162@saniq.com> Message-ID: <9A82CB6F-CD39-4285-B7A9-3CD9A6061A20@elevatedrails.com> On Nov 11, 2008, at 2:50 PM, Lee Mallabone wrote: > I use this migration (which makes use of the environment patch I > posted previously) to ensure you don't get auto-incrementing IDs. They > wouldn't make much sense when facebook are providing the ID! > > create_table :users, :id => false do |t| > t.column :id, :int64_pk, :null => false # the facebook uid > t.column :created_at, :datetime > t.column :last_seen, :datetime > end > You don't actually need the id field. If you just use :id=>false on your migration you can set the primary key field of your model to using the primary_key method. For example class User < ActiveRecord::Base primary_key :facebook_id end That let's you use an intention revealing name. Mike > Lee. > > > 2008/11/11 Anthony C. Eufemio : >> You'll also need to handle the fact that ids in Rails are >> automatically >> incremented so when a user uninstalls the app you won't be able to >> remove >> their account (perhaps just mark it as 'disabled' in your >> application or >> some similar approach) so when they decide to re-install the app >> all you >> have to do is set it to 'enabled' >> >> >> >> -AE >> >> On Tue, Nov 11, 2008 at 10:19 AM, Tres Wong-Godfrey >> wrote: >>> >>> As of Rails 2.1 64 bit ints are supported in MySQL migrations. >>> Formerly >>> you needed to use a plugin to get this working in MySQL. >>> >>> Rails 2.1.0 had some problems with the implementation, but in >>> 2.1.1 I >>> believe they have fixed the implementation to work the same as >>> Postgres, so >>> using :limit => 8 gets you bigint in mysql. >>> >>> So something like this, should work under Rails 2.1.1 with no >>> patching or >>> plugins necessary: >>> t.integer :facebook_id, :limit => 8, :null=> false >>> >>> >>> >>> On Nov 11, 2008, at 10:08 AM, Lee Mallabone wrote: >>> >>>> 2008/11/11 Joseph Durden : >>>>> >>>>> I am new to rails, and was wondering if there would be unknown >>>>> consequences >>>>> for setting the user tables primary key to being the facebook_id >>>>> of a >>>>> user. >>>>> I have implemented this funcionality, and everything is working >>>>> fine. >>>>> All >>>>> associations etc. What are the risks if there are any of >>>>> overridding >>>>> the id >>>>> with facebook_id? Why would I not want to do this? >>>> >>>> I'm doing this at the moment. The biggest thing I was concerned >>>> about >>>> was the potential for facebook user IDs to be 64bit numbers. (I >>>> can't >>>> remember the official Facebook stance on ID size but I'm pretty >>>> sure >>>> they weren't ruling out 64bit IDs). Rails migrations don't seem to >>>> support 64bit values (on mysql at least) out-of-the-box. >>>> >>>> I worked around the issue by patching ActiveRecord. I added a >>>> snippet >>>> (attached) to environment.rb based on the following post and all >>>> seems >>>> fine to date: >>>> http://snippets.dzone.com/posts/show/4422 >>>> >>>> Use column type :int64_pk for your users table and :int64 for any >>>> foreign key columns. >>>> >>>> Lee. >>>> >>>> >>>> >>>> -- >>>> Lee Mallabone. >>>> Director, Crossbone Systems Ltd. >>>> >>>> http://www.crossbonesystems.com/ >>>> http://www.fonicmonkey.net/ >>>> http://CambridgeWebHeads.ning.com/ >>>> >>>> >>> monkeypatch.rb>_______________________________________________ >>>> 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 >> >> > > > > -- > Lee Mallabone. > Director, Crossbone Systems Ltd. > > http://www.crossbonesystems.com/ > http://www.fonicmonkey.net/ > http://CambridgeWebHeads.ning.com/ > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk -- Mike Mangino http://www.elevatedrails.com From srjoseph at hawaii.edu Tue Nov 11 15:01:11 2008 From: srjoseph at hawaii.edu (Sam Joseph) Date: Tue, 11 Nov 2008 10:01:11 -1000 Subject: [Facebooker-talk] Facebooker scaffolding errors In-Reply-To: References: <8F96E010-7A12-4F76-977D-FD89DBF2A51D@hawaii.edu> <490F6093.806@hawaii.edu> Message-ID: <4919E487.2020501@hawaii.edu> Hi Stephane, Many thanks for getting back to us - that fixed it. Your help much appreciated CHEERS> SAM St?phane Akkaoui wrote: > Hi Sam, > > Soory for the delay... you may have fix your problem now. > But still, i give you some answers, they could be interesting for > others to. > > Le 3 nov. 08 ? 21:35, Sam Joseph a ?crit : >> we removed the trailing slash: >> canvas_page_name: http://apps.facebook.com/stem_survey > > The canvas page name is not an url. It's juste a name. > As I told you before, for your app, it's : > > canvas_page_name: stem_survey > > >>>> format.fbml { >>>> redirect_to('http://apps.facebook.com/stem_survey/survey_responses/'+ at survey_response.id.to_s) } >>>> >>> >>> If the canvas_page_name field is correctly set, you should be able >>> to do : redirect_to(@survey_response, :canvas => true) >> Did that, but got this error: >> >> ArgumentError in Survey responsesController#create >> >> wrong number of arguments (2 for 1) > > Here is an example : > > # in config/root.rb > map.resources :messages > > # in script/console > >> app.messages_url() > => "http://www.example.com/messages" > >> app.messages_url(:canvas => true) > => "http://apps.new.facebook.com/alisterapptrois/messages" > >> @message = Message.find(:first) > => # page_uid: 26149797103, created_at: "2008-10-16 13:59:04", updated_at: > "2008-10-16 13:59:04"> > >> app.message_url(@message, :canvas => true) > => "http://apps.new.facebook.com/canvas_page_name/messages/29" > >> app.message_url(@message, :canvas => false) > => "http://www.example.com/messages/29" > >> app.message_url(@message) > => "http://www.example.com/messages/29" > > # in app/controller/hello_controller > def foo > @message = Message.find(:first) > redirect_to( message_url(@message, :canvas => true)) > end > > # in script/server (logs after calling > http://localhost:3000/hello/toto) > Processing HelloController#toto (for 127.0.0.1 at 2008-11-07 > 13:03:53) [GET] > Session ID: 3c6050ab0cfc62d75ddc7a1441792271 > Parameters: {"action"=>"toto", "controller"=>"hello"} > Message Load (0.000276) SELECT * FROM `messages` LIMIT 1 > Message Columns (0.002220) SHOW FIELDS FROM `messages` > Redirected to > http://apps.new.facebook.com/canvas_page_name/messages/29 > Completed in 0.00896 (111 reqs/sec) | DB: 0.00312 (34%) | 302 > Found [http://localhost/hello/toto] > > # in app/controller/hello_controller > def foo > @message = Message.find(:first) > redirect_to( message_url(@message)) > end > > # in script/server (logs after calling > http://localhost:3000/hello/toto) > Processing HelloController#toto (for 127.0.0.1 at 2008-11-07 > 13:03:08) [GET] > Session ID: 3c6050ab0cfc62d75ddc7a1441792271 > Parameters: {"action"=>"toto", "controller"=>"hello"} > Message Load (0.000266) SELECT * FROM `messages` LIMIT 1 > Message Columns (0.001918) SHOW FIELDS FROM `messages` > Redirected to http://localhost:3000/messages/29 > Completed in 0.01750 (57 reqs/sec) | DB: 0.00615 (35%) | 302 Found > [http://localhost/hello/toto] > > HTH, > -- Sam Joseph, Ph.D. Co-Director Laboratory for Interactive Learning Technologies Department of Information and Computer Sciences University of Hawaii From mixonic at synitech.com Tue Nov 11 16:27:50 2008 From: mixonic at synitech.com (Matthew Beale) Date: Tue, 11 Nov 2008 16:27:50 -0500 Subject: [Facebooker-talk] facebook_url_helper breaking link_to in actionmailer Message-ID: <1226438870.8707.25.camel@localhost> Hey all, The new facebook_url_helper code relies on request_comes_from_facebook? for link_to and other common helpers. request_comes_from_facebook? is only defined when in a normal view. I needed the attached patch to fix my emails. It's not really a pretty solution, I just change all: !request_comes_from_facebook? to !(request_comes_from_facebook? rescue false) this is on [7d46417a7dabb0772c0757b63fe5374ae96f34f1]. -- Matthew Beale :: 607 227 0871 Resume & Portfolio @ http://madhatted.com -------------- next part -------------- A non-text attachment was scrubbed... Name: dont_fail_in_non_controllers.patch Type: text/x-patch Size: 2436 bytes Desc: not available URL: From mmangino at elevatedrails.com Tue Nov 11 16:56:11 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Tue, 11 Nov 2008 16:56:11 -0500 Subject: [Facebooker-talk] facebook_url_helper breaking link_to in actionmailer In-Reply-To: <1226438870.8707.25.camel@localhost> References: <1226438870.8707.25.camel@localhost> Message-ID: Even better, if you can create a failing test for it, I'll work on a fix. Mike On Nov 11, 2008, at 4:27 PM, Matthew Beale wrote: > Hey all, > > The new facebook_url_helper code relies on > request_comes_from_facebook? > for link_to and other common helpers. request_comes_from_facebook? is > only defined when in a normal view. > > I needed the attached patch to fix my emails. It's not really a > pretty > solution, I just change all: > > !request_comes_from_facebook? > > to > > !(request_comes_from_facebook? rescue false) > > this is on [7d46417a7dabb0772c0757b63fe5374ae96f34f1]. > > -- > Matthew Beale :: 607 227 0871 > Resume & Portfolio @ http://madhatted.com > < > dont_fail_in_non_controllers > .patch>_______________________________________________ > 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 Nov 11 17:25:29 2008 From: mjfreshyfresh at gmail.com (Michael Jones) Date: Tue, 11 Nov 2008 14:25:29 -0800 Subject: [Facebooker-talk] Multiple FB Apps Single Rails Instance? Message-ID: <9C37C515-12AF-4ACB-A9C3-050F080F0AE1@gmail.com> Hey Folks- First off thanks for a great library! We've been building apps with Facebooker for a while now and it really eases some of the Facebook madness. Secondly, I'm getting tired of setting up a Rails stack for each FB app. Since some of these apps are small and focused I'd really like to have a single controller represent a FB app. I've been looking over Facebooker and have some ideas on how to hack it to get this functionality but was wondering if the group had any suggestions or pointers for this sort of functionality? Thanks- MJ From josephdurden at gmail.com Tue Nov 11 17:51:52 2008 From: josephdurden at gmail.com (Joseph Durden) Date: Tue, 11 Nov 2008 14:51:52 -0800 Subject: [Facebooker-talk] Overriding id with facebook_id??? In-Reply-To: References: Message-ID: Mike, you said specifying :limit =>21 should allow support for 64 bit integers? this did not work in rails 2.1.2, as i had to do the following to get a mysql bigint(20) to work in my users table: t.column :facebook_id, 'bigint', :null => false Upon running a migration, I get a successful bigint(20) column in my mysql database. with :limit =>21, i was getting an integer column in mysql. I was required to have a bigint column when using facebooker_authentication and integrating with Bebo. I was receiving duplicate key errors within facebooker_authentication model.rb file in the following method: def for_facebook_id(facebook_id,facebook_session=nil) returning find_or_create_by_facebook_id(facebook_id) do |user| unless facebook_session.nil? user.store_session(facebook_session.session_key) end end end I was getting a Mysql::Error: duplicate key entry on returning find_or_create_by_facebook_id(facebook_id) when integrating with Bebo. After changing the column in mysql to bigint, everything is now working as expected. Would you recommend against setting 'bigint' directly in the migration file, and if so, what would you suggest, and is bigint(20) enough, or should it be bigint(64)? Joe On Tue, Nov 11, 2008 at 10:16 AM, Mike Mangino wrote: > > On Nov 11, 2008, at 1:08 PM, Lee Mallabone wrote: > > 2008/11/11 Joseph Durden : >> >>> I am new to rails, and was wondering if there would be unknown >>> consequences >>> for setting the user tables primary key to being the facebook_id of a >>> user. >>> I have implemented this funcionality, and everything is working fine. >>> All >>> associations etc. What are the risks if there are any of overridding the >>> id >>> with facebook_id? Why would I not want to do this? >>> >> >> I'm doing this at the moment. The biggest thing I was concerned about >> was the potential for facebook user IDs to be 64bit numbers. (I can't >> remember the official Facebook stance on ID size but I'm pretty sure >> they weren't ruling out 64bit IDs). Rails migrations don't seem to >> support 64bit values (on mysql at least) out-of-the-box. >> >> I worked around the issue by patching ActiveRecord. I added a snippet >> (attached) to environment.rb based on the following post and all seems >> fine to date: >> http://snippets.dzone.com/posts/show/4422 >> >> Use column type :int64_pk for your users table and :int64 for any >> foreign key columns. >> >> > For Mysql, just use :integer, :limit=>21 > > That forces the use of bigints. Facebook is using 64bit user ids. > > Mike > > Lee. >> >> >> >> -- >> Lee Mallabone. >> Director, Crossbone Systems Ltd. >> >> http://www.crossbonesystems.com/ >> http://www.fonicmonkey.net/ >> http://CambridgeWebHeads.ning.com/ >> >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/facebooker-talk >> > > -- > Mike Mangino > http://www.elevatedrails.com > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From digidigo at gmail.com Tue Nov 11 19:51:39 2008 From: digidigo at gmail.com (David Clements) Date: Tue, 11 Nov 2008 17:51:39 -0700 Subject: [Facebooker-talk] Multiple FB Apps Single Rails Instance? In-Reply-To: <9C37C515-12AF-4ACB-A9C3-050F080F0AE1@gmail.com> References: <9C37C515-12AF-4ACB-A9C3-050F080F0AE1@gmail.com> Message-ID: You can start by adding something like this to your YAML file foo_api_key: SOMEOTHERAPIKEY foo_secret_key: SECRET foo_canvas_page_name: supermeemcloud foo_callback_url: http://localhost:3000 foo_adapter: FacebookAdapter Where foo is any unique string. Then I think you will have to do something with routes. I don't know if anyone is doing this in production. But it should get you 90% of the way there. Dave On Tue, Nov 11, 2008 at 3:25 PM, Michael Jones wrote: > Hey Folks- > > First off thanks for a great library! We've been building apps with > Facebooker for a while now and it really eases some of the Facebook madness. > > Secondly, I'm getting tired of setting up a Rails stack for each FB app. > Since some of these apps are small and focused I'd really like to have a > single controller represent a FB app. > > I've been looking over Facebooker and have some ideas on how to hack it to > get this functionality but was wondering if the group had any suggestions or > pointers for this sort of functionality? > > Thanks- > MJ > _______________________________________________ > 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 josephdurden at gmail.com Wed Nov 12 03:53:51 2008 From: josephdurden at gmail.com (Joseph Durden) Date: Wed, 12 Nov 2008 00:53:51 -0800 Subject: [Facebooker-talk] Bebo SessionExpired: Session Key invalid or no longer valid? Message-ID: Hello everyone, I am getting the following errors while on bebo, but with facebook everything works as it should. When at the console I try making an api call, and it does not work. Am I not calling the bebo api right? My assumption is that this should work, unless I need to somehow pass in the fb_sig_network params somewhere. Anyone have any ideas what to do? >> User.find(1).facebook_session.user.friends Facebooker::Session::SessionExpired: Session key invalid or no longer valid from /home/jos/rails_projects/fb_bebo/vendor/plugins/facebooker/lib/facebooker/parser.rb:481:in `process' from /home/jos/rails_projects/fb_bebo/vendor/plugins/facebooker/lib/facebooker/parser.rb:15:in `parse' from /home/jos/rails_projects/fb_bebo/vendor/plugins/facebooker/lib/facebooker/service.rb:14:in `post' from /home/jos/rails_projects/fb_bebo/vendor/plugins/facebooker/lib/facebooker/session.rb:480:in `post_without_logging' from /home/jos/rails_projects/fb_bebo/vendor/plugins/facebooker/lib/facebooker/session.rb:491:in `post' from /home/jos/rails_projects/fb_bebo/vendor/plugins/facebooker/lib/facebooker/logging.rb:17:in `log_fb_api' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/core_ext/benchmark.rb:8:in `realtime' from /home/jos/rails_projects/fb_bebo/vendor/plugins/facebooker/lib/facebooker/logging.rb:17:in `log_fb_api' from /home/jos/rails_projects/fb_bebo/vendor/plugins/facebooker/lib/facebooker/session.rb:490:in `post' from /home/jos/rails_projects/fb_bebo/vendor/plugins/facebooker/lib/facebooker/models/user.rb:85:in `friends' from (irb):13 from :0 Graciously, Joe -------------- next part -------------- An HTML attachment was scrubbed... URL: From josephdurden at gmail.com Wed Nov 12 04:03:05 2008 From: josephdurden at gmail.com (Joseph Durden) Date: Wed, 12 Nov 2008 01:03:05 -0800 Subject: [Facebooker-talk] Bebo SessionExpired: Session Key invalid or no longer valid? In-Reply-To: References: Message-ID: Another note, it seems that the sessions dont work in the console but they do in controller and view code. Is there a reason why this is? Graciously, J Durden On Wed, Nov 12, 2008 at 12:53 AM, Joseph Durden wrote: > Hello everyone, > > I am getting the following errors while on bebo, but with facebook > everything works as it should. When at the console I try making an api > call, and it does not work. Am I not calling the bebo api right? My > assumption is that this should work, unless I need to somehow pass in the > fb_sig_network params somewhere. > > Anyone have any ideas what to do? > > >> User.find(1).facebook_session.user.friends > Facebooker::Session::SessionExpired: Session key invalid or no longer valid > from > /home/jos/rails_projects/fb_bebo/vendor/plugins/facebooker/lib/facebooker/parser.rb:481:in > `process' > from > /home/jos/rails_projects/fb_bebo/vendor/plugins/facebooker/lib/facebooker/parser.rb:15:in > `parse' > from > /home/jos/rails_projects/fb_bebo/vendor/plugins/facebooker/lib/facebooker/service.rb:14:in > `post' > from > /home/jos/rails_projects/fb_bebo/vendor/plugins/facebooker/lib/facebooker/session.rb:480:in > `post_without_logging' > from > /home/jos/rails_projects/fb_bebo/vendor/plugins/facebooker/lib/facebooker/session.rb:491:in > `post' > from > /home/jos/rails_projects/fb_bebo/vendor/plugins/facebooker/lib/facebooker/logging.rb:17:in > `log_fb_api' > from > /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/core_ext/benchmark.rb:8:in > `realtime' > from > /home/jos/rails_projects/fb_bebo/vendor/plugins/facebooker/lib/facebooker/logging.rb:17:in > `log_fb_api' > from > /home/jos/rails_projects/fb_bebo/vendor/plugins/facebooker/lib/facebooker/session.rb:490:in > `post' > from > /home/jos/rails_projects/fb_bebo/vendor/plugins/facebooker/lib/facebooker/models/user.rb:85:in > `friends' > from (irb):13 > from :0 > > > Graciously, > > Joe > -------------- next part -------------- An HTML attachment was scrubbed... URL: From marcdurden at gmail.com Wed Nov 12 14:46:11 2008 From: marcdurden at gmail.com (Marco Durden) Date: Wed, 12 Nov 2008 11:46:11 -0800 Subject: [Facebooker-talk] opensocial porting or rails libraries? Message-ID: Anyone know of any good libraries for making an opensocial app with ruby on rails, or for porting an existing facebook app over to opensocial? What is everyone doing for porting their apps to opensocial? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From josephdurden at gmail.com Wed Nov 12 19:56:02 2008 From: josephdurden at gmail.com (Joseph Durden) Date: Wed, 12 Nov 2008 16:56:02 -0800 Subject: [Facebooker-talk] javascript help Message-ID: First off, I have no experience with javascript. Below is the html from an input submit. I am having problems in my controller with params[:ids] being set when it should not be getting set when clicking the input type submit value="Next". This params[:ids] should only be set when clicking the input type value="Send Message". The problem exists when selecting a list of users, and then removing them from the selection before submitting. If this is the html that is in a facebook canvas page, how could I write javascript that sets the parameters of the form to be empty, so that the parameters set params[:ids] in the controller to nil if the input submit value="Next" is clicked? I figure I could do a check in two ways: one by checking the value of the input type being submitted, and if the value is Next, set the parameters to empty,and the other by checking the name of the input type, and if there is no name, then set parameters to empty. How would I approach getting this problem solved with javascript. I am only resorting to javascript because I have found no other work around.
Graciously, J Durden -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephane.akkaoui at imeuble.info Thu Nov 13 05:13:33 2008 From: stephane.akkaoui at imeuble.info (=?ISO-8859-1?Q?St=E9phane_Akkaoui?=) Date: Thu, 13 Nov 2008 11:13:33 +0100 Subject: [Facebooker-talk] opensocial porting or rails libraries? In-Reply-To: References: Message-ID: Le 12 nov. 08 ? 20:46, Marco Durden a ?crit : > Anyone know of any good libraries for making an opensocial app with > ruby on rails, or for porting an existing facebook app over to > opensocial? What is everyone doing for porting their apps to > opensocial? I've got the same question :) Would like some advices, feedbacks... Currently, I'm trying to build my own library for opensocial, but I'm just at the begening. Thanks -- St?phane Akkaoui From aeon2012 at gmail.com Thu Nov 13 13:05:19 2008 From: aeon2012 at gmail.com (Anthony C. Eufemio) Date: Thu, 13 Nov 2008 10:05:19 -0800 Subject: [Facebooker-talk] opensocial porting or rails libraries? In-Reply-To: References: Message-ID: I've been spending some of my free time working on a DataMapper based Ruby/Merb plugin based off on the dm-rest-adapter for OpenSocial. So look at creating your own Ruby based REST client that you can eventually turn into a Rails plugin. OpenSocial uses OAuth to authenticate REST clients. OAuth clients in Ruby: http://stakeventures.com/articles/2008/02/23/developing-oauth-clients-in-ruby REST: http://rest-client.heroku.com/rdoc/ That should be enough to get you started with your own plugin. -AE On Thu, Nov 13, 2008 at 2:13 AM, St?phane Akkaoui < stephane.akkaoui at imeuble.info> wrote: > > Le 12 nov. 08 ? 20:46, Marco Durden a ?crit : > >> Anyone know of any good libraries for making an opensocial app with ruby >> on rails, or for porting an existing facebook app over to opensocial? What >> is everyone doing for porting their apps to opensocial? >> > > I've got the same question :) Would like some advices, feedbacks... > > Currently, I'm trying to build my own library for opensocial, but I'm just > at the begening. > > Thanks > > -- > St?phane Akkaoui > _______________________________________________ > 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 msummers at solarpowerme.com Thu Nov 13 16:19:18 2008 From: msummers at solarpowerme.com (Mike Summers) Date: Thu, 13 Nov 2008 15:19:18 -0600 Subject: [Facebooker-talk] Form method=get signature failure In-Reply-To: References: Message-ID: <491C99D6.8020706@solarpowerme.com> An HTML attachment was scrubbed... URL: From agiledevcool at gmail.com Thu Nov 13 16:24:05 2008 From: agiledevcool at gmail.com (Agile Dev) Date: Thu, 13 Nov 2008 13:24:05 -0800 Subject: [Facebooker-talk] Form method=get signature failure In-Reply-To: <491C99D6.8020706@solarpowerme.com> References: <491C99D6.8020706@solarpowerme.com> Message-ID: I am also experiencing issues with Incorrect Signatures. The signatures that Facebook are passing are of a strange format. For example: 2:t2lkRVehtrhJWvEMUlny_g__:86400:1226696400-213412341 It seems like a lot of people are experiencing this problem ( http://forum.developers.facebook.com/viewtopic.php?id=24251). Did Facebook change the format of the session key? On Thu, Nov 13, 2008 at 1:19 PM, Mike Summers wrote: > This just started showing up in a working app, anyone else seeing this? > > > Paul Covell wrote: > > 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 > > > _______________________________________________ > 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 agiledevcool at gmail.com Thu Nov 13 16:26:00 2008 From: agiledevcool at gmail.com (Agile Dev) Date: Thu, 13 Nov 2008 13:26:00 -0800 Subject: [Facebooker-talk] Form method=get signature failure In-Reply-To: References: <491C99D6.8020706@solarpowerme.com> Message-ID: Looks like the Facebook Platform Team is aware of this issue. You can track the bug here: http://bugs.developers.facebook.com/show_bug.cgi?id=3754 On Thu, Nov 13, 2008 at 1:24 PM, Agile Dev wrote: > I am also experiencing issues with Incorrect Signatures. The signatures > that Facebook are passing are of a strange format. For example: > > 2:t2lkRVehtrhJWvEMUlny_g__:86400:1226696400-213412341 > > It seems like a lot of people are experiencing this problem ( > http://forum.developers.facebook.com/viewtopic.php?id=24251). > > Did Facebook change the format of the session key? > > On Thu, Nov 13, 2008 at 1:19 PM, Mike Summers wrote: > >> This just started showing up in a working app, anyone else seeing this? >> >> >> Paul Covell wrote: >> >> 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 >> >> >> _______________________________________________ >> 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 chad at remesch.com Thu Nov 13 16:26:19 2008 From: chad at remesch.com (Chad Remesch) Date: Thu, 13 Nov 2008 13:26:19 -0800 Subject: [Facebooker-talk] Form method=get signature failure In-Reply-To: <491C99D6.8020706@solarpowerme.com> References: <491C99D6.8020706@solarpowerme.com> Message-ID: <81F6C036-3D9A-4E5E-83FA-8A6FF94C0D68@remesch.com> I'm seeing it on both of my production apps. The only quick fix I found is to comment out a couple lines in verify_signature (vendor/plugins/facebooker/lib/facebooker/rails/ controller.rb). I'm trying to find out what's going on. On Nov 13, 2008, at 1:19 PM, Mike Summers wrote: > This just started showing up in a working app, anyone else seeing > this? > > Paul Covell wrote: >> >> 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 >> > _______________________________________________ > 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 agiledevcool at gmail.com Thu Nov 13 16:31:15 2008 From: agiledevcool at gmail.com (Agile Dev) Date: Thu, 13 Nov 2008 13:31:15 -0800 Subject: [Facebooker-talk] Form method=get signature failure In-Reply-To: <81F6C036-3D9A-4E5E-83FA-8A6FF94C0D68@remesch.com> References: <491C99D6.8020706@solarpowerme.com> <81F6C036-3D9A-4E5E-83FA-8A6FF94C0D68@remesch.com> Message-ID: >From the Developers Forum: > We've flipped the sitevar back for now while we investigate this issue. > > Platform Developer Operations & Support My apps are working now. On Thu, Nov 13, 2008 at 1:26 PM, Chad Remesch wrote: > I'm seeing it on both of my production apps. The only quick fix I found is > to comment out a couple lines inverify_signature > (vendor/plugins/facebooker/lib/facebooker/rails/controller.rb). I'm trying > to find out what's going on. > > On Nov 13, 2008, at 1:19 PM, Mike Summers wrote: > > This just started showing up in a working app, anyone else seeing this? > > Paul Covell wrote: > > 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 > > _______________________________________________ > 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 msummers at solarpowerme.com Thu Nov 13 16:50:08 2008 From: msummers at solarpowerme.com (Mike Summers) Date: Thu, 13 Nov 2008 15:50:08 -0600 Subject: [Facebooker-talk] Form method=get signature failure In-Reply-To: References: <491C99D6.8020706@solarpowerme.com> <81F6C036-3D9A-4E5E-83FA-8A6FF94C0D68@remesch.com> Message-ID: <491CA110.8050003@solarpowerme.com> An HTML attachment was scrubbed... URL: From schroeder.ken at gmail.com Fri Nov 14 00:33:58 2008 From: schroeder.ken at gmail.com (Ken Schroeder) Date: Fri, 14 Nov 2008 00:33:58 -0500 Subject: [Facebooker-talk] Iframe ensure_authenticated Message-ID: Anyone have any good ideas on how to use ensure_authenticated_to_facebook before_filters in a canvas iframe application that also has external interface? I had been checking controller.format == "fbml" in an fbml canvas app but looking at perhaps migrating to full iframe and having some challenges figuring out authenitcation. Would appreciate if anyone knows of any resources haven't found to much via google that I could apply via ruby on rails. Thanks --ken s. -------------- next part -------------- An HTML attachment was scrubbed... URL: From josephdurden at gmail.com Fri Nov 14 07:43:06 2008 From: josephdurden at gmail.com (Joseph Durden) Date: Fri, 14 Nov 2008 04:43:06 -0800 Subject: [Facebooker-talk] parameters for fb_sig_ext_perms =>not showing up??? Message-ID: Hello everyone, I am using fb_prompt_permission :email, "Give Permission!" and it is working properly. A user can give permission and my app can then send emails to users. I have a requirement that I have to document that a user has granted this email extended permission. I don't see the params for fb_sig_ext_perms => email? Why is this not showing up? Could this be the facebooker plugin or is it the actual www.facebook.com api? I noticed the fb_sig_ext_perms before filters although I dont need them before_filter :ensure_has_status_update before_filter :ensure_has_photo_upload before_filter :ensure_has_create_listing i have tested the above out, and i properly receive the params for status, photo and create. How can I get the email permissions sent as a params? I have also tried using fql to grab the email permissions for a given user. Here is the fql: >> current_user.facebook_session.fql_query("select email from permissions where uid = (#{current_user.facebook_id})") => [nil] I think that my fql is working properly but not sure. If anyone knows how to get the email sent in params or how to write a fql query that can give me the params I would be extatic! Here are my params: Parameters: {"fb_sig_time"=>"1221234687.6134", "fb_sig"=>"1234gsdrgdfh4634534yhdsrt6345634", "fb_sig_in_new_facebook"=>"1", "_method"=>"GET", "fb_sig_locale"=>"en_US", "action"=>"index", "fb_sig_session_key"=>"2354sdfgew563455sgerd34-1231241244", "fb_sig_position_fix"=>"1", "fb_sig_in_canvas"=>"1", "fb_sig_request_method"=>"GET", "controller"=>"home", "fb_sig_expires"=>"123345234234", "fb_sig_added"=>"1", "fb_sig_friends"=>"1153203682,1154273529,1189153592,1209608725,1212782770", "fb_sig_api_key"=>"1sd234243235235sdgttwet2354g345tr3", "fb_sig_ext_perms"=>"status_update,photo_upload,create_listing", "fb_sig_user"=>"12342342342", "fb_sig_profile_update_time"=>"1226123330"} as you can see there are no fb_sig_ext_perms. JD -------------- next part -------------- An HTML attachment was scrubbed... URL: From mixonic at synitech.com Fri Nov 14 07:54:15 2008 From: mixonic at synitech.com (Matthew Beale) Date: Fri, 14 Nov 2008 07:54:15 -0500 Subject: [Facebooker-talk] Iframe ensure_authenticated In-Reply-To: References: Message-ID: <1226667255.8668.7.camel@localhost> Hey Ken, So I've got an app with iframes, but we're using the fbml fb:iframe tag instead. To keep the pages distinct from app pages, I'm using the format of iframe, so: home_url(:format => :iframe) make a link to: /home.iframe which points to the template; app/view/home/index.iframe.erb so now I can have normal HTML templates, and iframe ones. They use the same controllers so you don't need to repeat the biz logic. Then you can rely on the fbml page that wraps your app to ensure the application is added (and the first iframe hit will have params to build a facebook sesssion). Not quite as powerful as a real iframe app for facebook, but maybe you can use fbml and only fall back to iframe where needed. Good luck! -- Matthew Beale :: 607 227 0871 Resume & Portfolio @ http://madhatted.com On Fri, 2008-11-14 at 00:33 -0500, Ken Schroeder wrote: > Anyone have any good ideas on how to use > ensure_authenticated_to_facebook before_filters in a canvas iframe > application that also has external interface? I had been checking > controller.format == "fbml" in an fbml canvas app but looking at > perhaps migrating to full iframe and having some challenges figuring > out authenitcation. Would appreciate if anyone knows of any resources > haven't found to much via google that I could apply via ruby on rails. > > Thanks --ken s. > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk From mmangino at elevatedrails.com Wed Nov 19 10:10:58 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Wed, 19 Nov 2008 10:10:58 -0500 Subject: [Facebooker-talk] Rails 2.2 support Message-ID: <69C6C498-A142-49EA-9055-06639395FC5B@elevatedrails.com> 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 From vincentchu at gmail.com Wed Nov 19 13:42:23 2008 From: vincentchu at gmail.com (vincent chu) Date: Wed, 19 Nov 2008 10:42:23 -0800 Subject: [Facebooker-talk] parameters for fb_sig_ext_perms =>not showing up??? In-Reply-To: References: Message-ID: Hi --- I just added a 'get_permissions' method to my FacebookUser model that queries facebook for a user's extended permissions. Your FQL query seems correct, but you have to call 'post', instead of 'fql_query': def get_permissions perms = Hash.new begin current_session = self.facebook_session current_session.post("facebook.fql.query", :query => "select email, offline_access, status_update, photo_upload, create_listing, create_event, rsvp_event, sms from permissions where uid=#{self.facebook_id}", :format => "XML") do |response| type = response.shift if (type != "permissions") return perms end response.shift.map do |hash| hash.each_pair{|key, value| (value == "1" ? perms.store(key, true) : perms.store(key, false) )} end end return perms rescue return nil end end Hope this helps. Cheers, Vince ---- Vincent Chu Department of Applied Physics Geballe Laboratory of Advanced Materials McCullough Bldg. 318 476 Lomita Mall Stanford, CA, 94305 vchu AT post.harvard.edu vincentchu AT gmail.com http://www.stanford.edu/~vincentc (homepage, updated sporadically) Consider this: "The smallest positive integer not definable in under eleven words." On Fri, Nov 14, 2008 at 4:43 AM, Joseph Durden wrote: > Hello everyone, > > I am using fb_prompt_permission :email, "Give Permission!" and it is working > properly. A user can give permission and my app can then send emails to > users. > > I have a requirement that I have to document that a user has granted this > email extended permission. I don't see the params for fb_sig_ext_perms => > email? Why is this not showing up? Could this be the facebooker plugin or > is it the actual www.facebook.com api? I noticed the fb_sig_ext_perms > before filters although I dont need them > > before_filter :ensure_has_status_update > before_filter :ensure_has_photo_upload > before_filter :ensure_has_create_listing > > > i have tested the above out, and i properly receive the params for status, > photo and create. How can I get the email permissions sent as a params? I > have also tried using fql to grab the email permissions for a given user. > Here is the fql: > >>> current_user.facebook_session.fql_query("select email from permissions >>> where uid = (#{current_user.facebook_id})") > => [nil] > > I think that my fql is working properly but not sure. > > If anyone knows how to get the email sent in params or how to write a fql > query that can give me the params I would be extatic! > > Here are my params: > > Parameters: {"fb_sig_time"=>"1221234687.6134", > "fb_sig"=>"1234gsdrgdfh4634534yhdsrt6345634", "fb_sig_in_new_facebook"=>"1", > "_method"=>"GET", "fb_sig_locale"=>"en_US", "action"=>"index", > "fb_sig_session_key"=>"2354sdfgew563455sgerd34-1231241244", > "fb_sig_position_fix"=>"1", "fb_sig_in_canvas"=>"1", > "fb_sig_request_method"=>"GET", "controller"=>"home", > "fb_sig_expires"=>"123345234234", "fb_sig_added"=>"1", > "fb_sig_friends"=>"1153203682,1154273529,1189153592,1209608725,1212782770", > "fb_sig_api_key"=>"1sd234243235235sdgttwet2354g345tr3", > "fb_sig_ext_perms"=>"status_update,photo_upload,create_listing", > "fb_sig_user"=>"12342342342", "fb_sig_profile_update_time"=>"1226123330"} > > as you can see there are no fb_sig_ext_perms. > > JD > > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > > From costan at gmail.com Wed Nov 19 14:59:20 2008 From: costan at gmail.com (Victor Costan) Date: Wed, 19 Nov 2008 14:59:20 -0500 Subject: [Facebooker-talk] Rails 2.2 support In-Reply-To: <69C6C498-A142-49EA-9055-06639395FC5B@elevatedrails.com> References: <69C6C498-A142-49EA-9055-06639395FC5B@elevatedrails.com> Message-ID: <59578a2b0811191159i5b131d11u733f6a334d9f235@mail.gmail.com> You already merged my changes that make Rails 2.2 happy. My app seems to work on 2.2RC2. 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 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 > From mmangino at elevatedrails.com Wed Nov 19 15:38:17 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Wed, 19 Nov 2008 15:38:17 -0500 Subject: [Facebooker-talk] Rails 2.2 support In-Reply-To: <59578a2b0811191159i5b131d11u733f6a334d9f235@mail.gmail.com> References: <69C6C498-A142-49EA-9055-06639395FC5B@elevatedrails.com> <59578a2b0811191159i5b131d11u733f6a334d9f235@mail.gmail.com> Message-ID: <9C771FD0-90B0-41A9-91D8-F54E2E96D937@elevatedrails.com> 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 From josephdurden at gmail.com Thu Nov 20 03:02:05 2008 From: josephdurden at gmail.com (Joseph Durden) Date: Thu, 20 Nov 2008 00:02:05 -0800 Subject: [Facebooker-talk] parameters for fb_sig_ext_perms =>not showing up??? In-Reply-To: References: Message-ID: Thanks Vincent. You solution works great. JD On Wed, Nov 19, 2008 at 10:42 AM, vincent chu wrote: > Hi --- > > I just added a 'get_permissions' method to my FacebookUser model that > queries facebook for a user's extended permissions. Your FQL query > seems correct, but you have to call 'post', instead of 'fql_query': > > def get_permissions > > perms = Hash.new > > begin > current_session = self.facebook_session > current_session.post("facebook.fql.query", > :query => "select email, offline_access, > status_update, photo_upload, create_listing, create_event, rsvp_event, > sms from permissions where uid=#{self.facebook_id}", > :format => "XML") do |response| > > type = response.shift > if (type != "permissions") > return perms > end > > response.shift.map do |hash| > hash.each_pair{|key, value| (value == "1" ? perms.store(key, > true) : perms.store(key, false) )} > end > end > > return perms > > rescue > return nil > end > > end > > > Hope this helps. Cheers, > > Vince > > ---- > Vincent Chu > Department of Applied Physics > Geballe Laboratory of Advanced Materials > McCullough Bldg. 318 > 476 Lomita Mall > Stanford, CA, 94305 > > vchu AT post.harvard.edu > vincentchu AT gmail.com > > http://www.stanford.edu/~vincentc (homepage, updated sporadically) > > Consider this: > "The smallest positive integer not definable in under eleven words." > > > > On Fri, Nov 14, 2008 at 4:43 AM, Joseph Durden > wrote: > > Hello everyone, > > > > I am using fb_prompt_permission :email, "Give Permission!" and it is > working > > properly. A user can give permission and my app can then send emails to > > users. > > > > I have a requirement that I have to document that a user has granted this > > email extended permission. I don't see the params for fb_sig_ext_perms > => > > email? Why is this not showing up? Could this be the facebooker plugin > or > > is it the actual www.facebook.com api? I noticed the fb_sig_ext_perms > > before filters although I dont need them > > > > before_filter :ensure_has_status_update > > before_filter :ensure_has_photo_upload > > before_filter :ensure_has_create_listing > > > > > > i have tested the above out, and i properly receive the params for > status, > > photo and create. How can I get the email permissions sent as a params? > I > > have also tried using fql to grab the email permissions for a given user. > > Here is the fql: > > > >>> current_user.facebook_session.fql_query("select email from permissions > >>> where uid = (#{current_user.facebook_id})") > > => [nil] > > > > I think that my fql is working properly but not sure. > > > > If anyone knows how to get the email sent in params or how to write a fql > > query that can give me the params I would be extatic! > > > > Here are my params: > > > > Parameters: {"fb_sig_time"=>"1221234687.6134", > > "fb_sig"=>"1234gsdrgdfh4634534yhdsrt6345634", > "fb_sig_in_new_facebook"=>"1", > > "_method"=>"GET", "fb_sig_locale"=>"en_US", "action"=>"index", > > "fb_sig_session_key"=>"2354sdfgew563455sgerd34-1231241244", > > "fb_sig_position_fix"=>"1", "fb_sig_in_canvas"=>"1", > > "fb_sig_request_method"=>"GET", "controller"=>"home", > > "fb_sig_expires"=>"123345234234", "fb_sig_added"=>"1", > > > "fb_sig_friends"=>"1153203682,1154273529,1189153592,1209608725,1212782770", > > "fb_sig_api_key"=>"1sd234243235235sdgttwet2354g345tr3", > > "fb_sig_ext_perms"=>"status_update,photo_upload,create_listing", > > "fb_sig_user"=>"12342342342", "fb_sig_profile_update_time"=>"1226123330"} > > > > as you can see there are no fb_sig_ext_perms. > > > > JD > > > > _______________________________________________ > > 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 dohe at hawaii.edu Fri Nov 21 16:50:24 2008 From: dohe at hawaii.edu (Kate Dohe) Date: Fri, 21 Nov 2008 11:50:24 -1000 Subject: [Facebooker-talk] fieldWithErrors implementation Message-ID: <1FA3B1F7-E575-410B-A3E0-A282AEAC1628@hawaii.edu> Hi all, Our development team is trying to implement a .fieldWithErrors style in our survey form, and as yet have not been able to get anything to display. We are currently calling both scaffold.css and facebook_scaffold.css in our survey_response layout, with no result. Any help would be appreciated. Thanks, ================= Kate Dohe HNLC Staff email: dohe at hawaii.edu cell phone: 417.773.4876 office: POST 309, University of Hawai'i at Manoa From loic at chollier.com Mon Nov 24 08:38:52 2008 From: loic at chollier.com (=?ISO-8859-1?Q?Lo=EFc_Chollier?=) Date: Mon, 24 Nov 2008 14:38:52 +0100 Subject: [Facebooker-talk] fb_name ? Message-ID: hi i have a big problem :'( hum actually i made an app where we can post our cooking recipes and i made a tab called "all recipes" but my problem is that if i'm not friend with the person who posted the recipe, so i'm not able to see his name and his picture is there any way to solve my problem ? knowing that both of them are in the "france" network Lo?c CHOLLIER loic at chollier.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From mmangino at elevatedrails.com Mon Nov 24 11:14:56 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Mon, 24 Nov 2008 11:14:56 -0500 Subject: [Facebooker-talk] fb_name ? In-Reply-To: References: Message-ID: <7BCDE45B-7B43-4146-8999-2F0D8F2E4B16@elevatedrails.com> That's the way the Facebook privacy implementation works. It is covered in the API documentation for Facebook. There are ways to display an alternate name (like "Anonymous Coward") instead of a blank name, but no way to override a user's privacy settings. Mike On Nov 24, 2008, at 8:38 AM, Lo?c Chollier wrote: > hi > i have a big problem :'( hum actually i made an app where we can > post our cooking recipes and i made a tab called "all recipes" > but my problem is that if i'm not friend with the person who posted > the recipe, so i'm not able to see his name and his picture > is there any way to solve my problem ? > knowing that both of them are in the "france" network > > > Lo?c CHOLLIER > loic at chollier.com > > > > _______________________________________________ > 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 Mon Nov 24 11:47:17 2008 From: srjoseph at hawaii.edu (Sam Joseph) Date: Mon, 24 Nov 2008 06:47:17 -1000 Subject: [Facebooker-talk] running functional tests Message-ID: <492ADA95.1060309@hawaii.edu> Hi All, Trying to run functional tests for my facebooker app I get the following error: 1) Error: test_should_create_invitation(InvitationsControllerTest): Facebooker::Session::ConfigurationMissing: Could not find configuration information for api /Users/samueljoseph/Code/eclipse-workspace/stem_survey/vendor/plugins/facebooker/lib/facebooker/session.rb:531:in `report_inability_to_find_key' /Users/samueljoseph/Code/eclipse-workspace/stem_survey/vendor/plugins/facebooker/lib/facebooker/session.rb:73:in `api_key' /Users/samueljoseph/Code/eclipse-workspace/stem_survey/vendor/plugins/facebooker/lib/facebooker/session.rb:66:in `create' /Users/samueljoseph/Code/eclipse-workspace/stem_survey/vendor/plugins/facebooker/lib/facebooker/rails/controller.rb:99:in `new_facebook_session' /Users/samueljoseph/Code/eclipse-workspace/stem_survey/vendor/plugins/facebooker/lib/facebooker/rails/controller.rb:92:in `create_new_facebook_session_and_redirect!' /Users/samueljoseph/Code/eclipse-workspace/stem_survey/vendor/plugins/facebooker/lib/facebooker/rails/controller.rb:204:in `ensure_authenticated_to_facebook' /Users/samueljoseph/Code/eclipse-workspace/stem_survey/vendor/plugins/facebooker/lib/facebooker/rails/controller.rb:209: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' Does anyone know a simple fix for this? 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 Mon Nov 24 11:59:28 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Mon, 24 Nov 2008 11:59:28 -0500 Subject: [Facebooker-talk] running functional tests In-Reply-To: <492ADA95.1060309@hawaii.edu> References: <492ADA95.1060309@hawaii.edu> Message-ID: Do you have your test environment configured in facebooker.yml? Mike On Nov 24, 2008, at 11:47 AM, Sam Joseph wrote: > Hi All, > > Trying to run functional tests for my facebooker app I get the > following error: > > 1) Error: > test_should_create_invitation(InvitationsControllerTest): > Facebooker::Session::ConfigurationMissing: Could not find > configuration information for api > /Users/samueljoseph/Code/eclipse-workspace/stem_survey/vendor/ > plugins/facebooker/lib/facebooker/session.rb:531:in > `report_inability_to_find_key' > /Users/samueljoseph/Code/eclipse-workspace/stem_survey/vendor/ > plugins/facebooker/lib/facebooker/session.rb:73:in `api_key' > /Users/samueljoseph/Code/eclipse-workspace/stem_survey/vendor/ > plugins/facebooker/lib/facebooker/session.rb:66:in `create' > /Users/samueljoseph/Code/eclipse-workspace/stem_survey/vendor/ > plugins/facebooker/lib/facebooker/rails/controller.rb:99:in > `new_facebook_session' > /Users/samueljoseph/Code/eclipse-workspace/stem_survey/vendor/ > plugins/facebooker/lib/facebooker/rails/controller.rb:92:in > `create_new_facebook_session_and_redirect!' > /Users/samueljoseph/Code/eclipse-workspace/stem_survey/vendor/ > plugins/facebooker/lib/facebooker/rails/controller.rb:204:in > `ensure_authenticated_to_facebook' > /Users/samueljoseph/Code/eclipse-workspace/stem_survey/vendor/ > plugins/facebooker/lib/facebooker/rails/controller.rb:209: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' > > > Does anyone know a simple fix for this? > > 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 -- Mike Mangino http://www.elevatedrails.com From mmangino at elevatedrails.com Mon Nov 24 14:14:08 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Mon, 24 Nov 2008 14:14:08 -0500 Subject: [Facebooker-talk] fb_name ? In-Reply-To: <98509CAD-F688-41D4-8A80-22CE83166181@chollier.com> References: <7BCDE45B-7B43-4146-8999-2F0D8F2E4B16@elevatedrails.com> <98509CAD-F688-41D4-8A80-22CE83166181@chollier.com> Message-ID: <65A435B1-85AF-45AC-A300-116F3B943132@elevatedrails.com> On Nov 24, 2008, at 2:06 PM, Lo?c Chollier wrote: > Hi, > > I don't really understand because in the API documentation, whe can > see that no session key is required so why could I not access just > to the name of the person ? > > Lo?c CHOLLIER > loic at chollier.com > You can access the name of the person. When you get the name of the person, you get the name in the context of a specific individual. This defaults to the current user. Privacy is built-in here. For performance reasons, you should probably be using the fb:name tag. I think the option you want is :ifcantsee Mike > > > Le 24 nov. 08 ? 17:14, Mike Mangino a ?crit : > >> That's the way the Facebook privacy implementation works. It is >> covered in the API documentation for Facebook. There are ways to >> display an alternate name (like "Anonymous Coward") instead of a >> blank name, but no way to override a user's privacy settings. >> >> Mike >> On Nov 24, 2008, at 8:38 AM, Lo?c Chollier wrote: >> >>> hi >>> i have a big problem :'( hum actually i made an app where we can >>> post our cooking recipes and i made a tab called "all recipes" >>> but my problem is that if i'm not friend with the person who >>> posted the recipe, so i'm not able to see his name and his picture >>> is there any way to solve my problem ? >>> knowing that both of them are in the "france" network >>> >>> >>> Lo?c CHOLLIER >>> loic at chollier.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 agiledevcool at gmail.com Mon Nov 24 16:56:51 2008 From: agiledevcool at gmail.com (Agile Dev) Date: Mon, 24 Nov 2008 13:56:51 -0800 Subject: [Facebooker-talk] refresh_img_src Message-ID: Hello all,Anyone else experiencing problems with the profile image cache? A few of my images were dropping from the cache, so I tried calling refresh_img_src. Now none of my images are showing up. My images are hosted on Amazon S3 and are showing up fine on the canvas pages. Any ideas? Thanks. AgileDevCool -------------- next part -------------- An HTML attachment was scrubbed... URL: From chrisnolan.ca+rubyforge at gmail.com Tue Nov 25 00:03:10 2008 From: chrisnolan.ca+rubyforge at gmail.com (Chris Nolan.ca) Date: Tue, 25 Nov 2008 00:03:10 -0500 Subject: [Facebooker-talk] refresh_img_src In-Reply-To: References: Message-ID: <4f6b19c0811242103j1d5844e9h8ed613cd845ea04e@mail.gmail.com> I too have problems. I too am on S3. See http://bugs.developers.facebook.com/show_bug.cgi?id=3740 for some recent attention to the matter. Might help if you give some details there for the FB crew to take a look at. My refreshImgSrc was taking 4 or 5 seconds today, and then the image that was cached would sit and sit and sit on fb end. FB had it, it just couldn't get it out. Any problem with the image cache could be one of 10,000 things though. See: http://bugs.developers.facebook.com/show_bug.cgi?id=75 for some of that history. Chris Nolan.ca http://ChrisNolan.ca/ http://pullbot.com/ On Mon, Nov 24, 2008 at 16:56, Agile Dev wrote: > Hello all, > Anyone else experiencing problems with the profile image cache? A few of my > images were dropping from the cache, so I tried calling refresh_img_src. > Now none of my images are showing up. > My images are hosted on Amazon S3 and are showing up fine on the canvas > pages. > Any ideas? > Thanks. > AgileDevCool > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > > From idavidcrockett at gmail.com Tue Nov 25 03:32:53 2008 From: idavidcrockett at gmail.com (David Crockett) Date: Tue, 25 Nov 2008 01:32:53 -0700 Subject: [Facebooker-talk] Sanitizing the New Session Key Format Message-ID: <7581EBFF-D63E-4B6D-A652-DB58B77A8FD0@gmail.com> Facebook's new session format contains periods and underscores which appear to be breaking mem_cache_store. To get my app working again, I appended the following code to the end of environment.rb class CGI class Session class MemCacheStore def check_id(id) #:nodoc:# id = id.gsub('-', '').gsub('.', '').gsub('_', '') /[^0-9a-zA-Z-]+/ =~ id.to_s ? false : true end end end end The above code tricks rails into thinking the session key only contains alphanumeric characters. How will the non-alphanumeric characters affect rails? Does anyone have a better solution for this problem? - David Crockett From stephane.akkaoui at imeuble.info Wed Nov 26 07:17:33 2008 From: stephane.akkaoui at imeuble.info (=?ISO-8859-1?Q?St=E9phane_Akkaoui?=) Date: Wed, 26 Nov 2008 13:17:33 +0100 Subject: [Facebooker-talk] New status_id in Facebook API - FIX Message-ID: Hi, I've had one of my application broken this morning (French time) with this error : NoMethodError (undefined method `status_id=' for #): It appear that Facebook API had change in the status : a status_id node is new : 785637999 I'll give talks at the #railsparty, about Facebooker and Yaps. http://4url.cc/5b. 47387474745 Liberal http://profile.ak.facebook.com/v230/475/16/t785637999_5809.jpg St?phane Akkaoui 1 Elfen Lied, Ergo Proxy, Bleach, Prison Break, Heroes, The Pretender 1227612551 .... So I've added an attr_accessor status_id to the Status class. Commit : 6df106d37fd5230295af06e8461663c7038dd244 HTH, -- St?phane Akkaoui http://www.sociabliz.com http://www.imeuble.info From mmangino at elevatedrails.com Wed Nov 26 08:21:20 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Wed, 26 Nov 2008 08:21:20 -0500 Subject: [Facebooker-talk] New status_id in Facebook API - FIX In-Reply-To: References: Message-ID: <613B5C37-A0EF-4149-A713-4BE95270825D@elevatedrails.com> And I've applied this to my tree. Thanks everyone for all your patches. I think I've only made about 25% of the changes over the last few months. I really appreciate all your great contributions. Mike On Nov 26, 2008, at 7:17 AM, St?phane Akkaoui wrote: > Hi, > > I've had one of my application broken this morning (French time) > with this error : > > NoMethodError (undefined method `status_id=' for > #): > > It appear that Facebook API had change in the status : a status_id > node is new : > > > 785637999 > > I'll give talks at the #railsparty, about Facebooker > and Yaps. http://4url.cc/5b. > > 47387474745 > > Liberal > http://profile.ak.facebook.com/v230/475/16/t785637999_5809.jpg > > St?phane Akkaoui > > 1 > Elfen Lied, Ergo Proxy, Bleach, Prison Break, Heroes, The > Pretender > 1227612551 > .... > > So I've added an attr_accessor status_id to the Status class. > > Commit : 6df106d37fd5230295af06e8461663c7038dd244 > > HTH, > > -- > St?phane Akkaoui > http://www.sociabliz.com > http://www.imeuble.info > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk -- Mike Mangino http://www.elevatedrails.com From pezlists at gmail.com Wed Nov 26 10:07:58 2008 From: pezlists at gmail.com (Perryn Fowler) Date: Thu, 27 Nov 2008 02:07:58 +1100 Subject: [Facebooker-talk] New status_id in Facebook API - FIX In-Reply-To: <613B5C37-A0EF-4149-A713-4BE95270825D@elevatedrails.com> References: <613B5C37-A0EF-4149-A713-4BE95270825D@elevatedrails.com> Message-ID: <1c319b810811260707q3b0b3d7esfdde77ebae97af53@mail.gmail.com> Hi All, I have recently returned to a pet facebook project that I had let sit idle for quite a while, so I am probably using a version of facebooker that is at least a year old. Nevertheless it was working up until a few hours ago... and then I started to have problems 1) First I started to get the 'undefined method `status_id=' error mentioned in this thread. Then, shortly afterwards I started getting 2) Facebooker::Session::SessionExpired (Session key invalid or no longer valid): which I assume is something to do with facebook's recent changes to the session key format. My app is not 'live' yet so this is not that big a deal, but it raises a few questions for me that hopefully some more experienced facebookerers can comment on 1) Does facebook make a habit of breaking stuff like this? One my app goes live am I going to have to monitor it constantly to see if its still working? 2) I know I am using an old version of facebooker, but it looks like the latest official release was in February, so I assume it would not contain fixes for my current problems. Should I be trying to check out from head or something? 3) Do most people ride the 'edge' of facebooker in order to pick up the latest fixes for stuff like this? cheers Perryn From mmangino at elevatedrails.com Wed Nov 26 10:24:46 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Wed, 26 Nov 2008 10:24:46 -0500 Subject: [Facebooker-talk] New status_id in Facebook API - FIX In-Reply-To: <1c319b810811260707q3b0b3d7esfdde77ebae97af53@mail.gmail.com> References: <613B5C37-A0EF-4149-A713-4BE95270825D@elevatedrails.com> <1c319b810811260707q3b0b3d7esfdde77ebae97af53@mail.gmail.com> Message-ID: <60261AFC-2854-4079-B63F-1241E6A2AA59@elevatedrails.com> On Nov 26, 2008, at 10:07 AM, Perryn Fowler wrote: > Hi All, > > I have recently returned to a pet facebook project that I had let sit > idle for quite a while, so I am probably using a version of facebooker > that is at least a year old. > > Nevertheless it was working up until a few hours ago... and then I > started to have problems > > 1) First I started to get the 'undefined method `status_id=' error > mentioned in this thread. > > Then, shortly afterwards I started getting > > 2) Facebooker::Session::SessionExpired (Session key invalid or no > longer valid): > > which I assume is something to do with facebook's recent changes to > the session key format. > > My app is not 'live' yet so this is not that big a deal, but it raises > a few questions for me that hopefully some more experienced > facebookerers can comment on > > 1) Does facebook make a habit of breaking stuff like this? One my app > goes live am I going to have to monitor it constantly to see if its > still working? Yes, Facebook breaks things quite often. It's a real pain. > > > 2) I know I am using an old version of facebooker, but it looks like > the latest official release was in February, so I assume it would not > contain fixes for my current problems. Should I be trying to check out > from head or something? Check out the new version on github. It has a bunch of changes > > > 3) Do most people ride the 'edge' of facebooker in order to pick up > the latest fixes for stuff like this? With as frequently as Facebook changes I think most people just use the git tree. We haven't really been doing releases all that often. I will start doing them more often once I get the github gem generation working. Mike > > > cheers > Perryn > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk -- Mike Mangino http://www.elevatedrails.com