Seeing as how Bebo''s platform is so close to Facebook''s, it makes sense to me to build in Bebo support to Facebooker. Is anyone working on this yet and would you guys be open to accepting patches for this? Or should I start a bebo specific sub project, or. . . Thanks, BJ ----- BJ Clark the science department bjclark at scidept.com www.scidept.com
Hey BJ, I am in the middle of a release right now but would love to start looking at this next week. We talked about this awhile ago on the list and Mike wanted to work on it in parallel, get it working, then look at how you could merge it in. Dave On Feb 5, 2008 2:54 PM, BJ Clark <bjclark at scidept.com> wrote:> Seeing as how Bebo''s platform is so close to Facebook''s, it makes > sense to me to build in Bebo support to Facebooker. > Is anyone working on this yet and would you guys be open to accepting > patches for this? > Or should I start a bebo specific sub project, or. . . > > Thanks, > BJ > ----- > BJ Clark > the science department > bjclark at scidept.com > www.scidept.com > > > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk >
My co-worker and have been working on this all day. I think we''re pretty close, but I''m having a problem trying to modify session.rb to work wtih both bebo and facebook support. Here''s what I''ve done: I changed facebooker.yml to have a bebo_secret_key, bebo_api_key, etc. Then, in init.rb I did: facebook_config = "#{RAILS_ROOT}/config/facebooker.yml" if File.exist?(facebook_config) FACEBOOKER = YAML.load_file(facebook_config)[RAILS_ENV] ENV[''FACEBOOK_API_KEY''] = FACEBOOKER[''api_key''] ENV[''FACEBOOK_SECRET_KEY''] = FACEBOOKER[''secret_key''] ENV[''FACEBOOKER_RELATIVE_URL_ROOT''] = FACEBOOKER[''canvas_page_name''] ENV["FACEBOOK_CANVAS_PATH"] = ''blah_blah'' ENV[''BEBO_API_KEY''] = FACEBOOKER[''bebo_api_key''] ENV[''BEBO_SECRET_KEY''] = FACEBOOKER[''bebo_secret_key''] ENV[''BEBO_RELATIVE_URL_ROOT''] = FACEBOOKER[''bebo_canvas_page_name''] ENV["BEBO_CANVAS_PATH"] = ''blah_blah'' end So, then in session.rb I see that this gets called when it goes to secure the session: def self.secret_key extract_key_from_environment(:secret) || extract_key_from_configuration_file(:secret) rescue report_inability_to_find_key(:secret) end and that should be calling the extract_key_from_environment method. So I modified it to look like this (and this is where I get stuck): def self.extract_key_from_environment(key_name) if params[:fb_sig_network] == "Bebo" logger.debug "Extracting bebo #{key_name.to_s}" val = ENV["BEBO_" + key_name.to_s.upcase + "_KEY"] else logger.debug "Extracting facebook #{key_name.to_s}" val = ENV["FACEBOOK_" + key_name.to_s.upcase + "_KEY"] end end I always get the error "Facebooker::Session::ConfigurationMissing (Could not find configuration information for secret):" The logger.debug message never get called (which really confuses me). Now, If use the code that is currently in the plugin, I have no problem on facebook, and bebo gives me the IncorrectSignature error, which is the correct behavior. I don''t understand why it''s failing like this. Anyone have any suggestions? Thanks, ----- BJ Clark the science department bjclark at scidept.com www.scidept.com> Hey BJ, > > I am in the middle of a release right now but would love to start > looking at this next week. We talked about this awhile ago on the > list and Mike wanted to work on it in parallel, get it working, then > look at how you could merge it in. > > Dave > > On Feb 5, 2008 2:54 PM, BJ Clark <bjclark at scidept.com> wrote: > > Seeing as how Bebo''s platform is so close to Facebook''s, it makes > > sense to me to build in Bebo support to Facebooker. > > Is anyone working on this yet and would you guys be open to > accepting > > patches for this? > > Or should I start a bebo specific sub project, or. . . > > > > Thanks, > > BJ > > ----- > > BJ Clark > > the science department > > bjclark at scidept.com > > www.scidept.com > > > > > > _______________________________________________ > > Facebooker-talk mailing list > > Facebooker-talk at rubyforge.org > > http://rubyforge.org/mailman/listinfo/facebooker-talk > >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/facebooker-talk/attachments/20080206/fedcae01/attachment.html
Hey BJ, On first pass I am wondering where are you getting ''params'' from? I think you are catching an exception there and the rescue is taking care of it. Just a guess, I didn''t try it. Dave On Feb 6, 2008 5:46 PM, BJ Clark <bjclark at scidept.com> wrote:> > My co-worker and have been working on this all day. I think we''re pretty > close, but I''m having a problem trying to modify session.rb to work wtih > both bebo and facebook support. > > Here''s what I''ve done: > I changed facebooker.yml to have a bebo_secret_key, bebo_api_key, etc. > Then, in init.rb I did: > > > facebook_config = "#{RAILS_ROOT}/config/facebooker.yml" > > if File.exist?(facebook_config) > FACEBOOKER = YAML.load_file(facebook_config)[RAILS_ENV] > ENV[''FACEBOOK_API_KEY''] = FACEBOOKER[''api_key''] > ENV[''FACEBOOK_SECRET_KEY''] = FACEBOOKER[''secret_key''] > ENV[''FACEBOOKER_RELATIVE_URL_ROOT''] = FACEBOOKER[''canvas_page_name''] > ENV["FACEBOOK_CANVAS_PATH"] = ''blah_blah'' > ENV[''BEBO_API_KEY''] = FACEBOOKER[''bebo_api_key''] > ENV[''BEBO_SECRET_KEY''] = FACEBOOKER[''bebo_secret_key''] > ENV[''BEBO_RELATIVE_URL_ROOT''] = FACEBOOKER[''bebo_canvas_page_name''] > ENV["BEBO_CANVAS_PATH"] = ''blah_blah'' > end > > So, then in session.rb I see that this gets called when it goes to secure > the session: > def self.secret_key > extract_key_from_environment(:secret) || > extract_key_from_configuration_file(:secret) rescue > report_inability_to_find_key(:secret) > end > > > and that should be calling the extract_key_from_environment method. > So I modified it to look like this (and this is where I get stuck): > > > def self.extract_key_from_environment(key_name) > if params[:fb_sig_network] == "Bebo" > logger.debug "Extracting bebo #{key_name.to_s}" > val = ENV["BEBO_" + key_name.to_s.upcase + "_KEY"] > else > logger.debug "Extracting facebook #{key_name.to_s}" > val = ENV["FACEBOOK_" + key_name.to_s.upcase + "_KEY"] > end > end > > I always get the error "Facebooker::Session::ConfigurationMissing (Could not > find configuration information for secret):" > The logger.debug message never get called (which really confuses me). > Now, If use the code that is currently in the plugin, I have no problem on > facebook, and bebo gives me the IncorrectSignature error, which is the > correct behavior. > > I don''t understand why it''s failing like this. > Anyone have any suggestions? > > Thanks, > ----- > BJ Clark > the science department > bjclark at scidept.com > www.scidept.com > > > > Hey BJ, > > I am in the middle of a release right now but would love to start > looking at this next week. We talked about this awhile ago on the > list and Mike wanted to work on it in parallel, get it working, then > look at how you could merge it in. > > Dave > > > On Feb 5, 2008 2:54 PM, BJ Clark <bjclark at scidept.com> wrote: > > Seeing as how Bebo''s platform is so close to Facebook''s, it makes > > sense to me to build in Bebo support to Facebooker. > > Is anyone working on this yet and would you guys be open to accepting > > patches for this? > > Or should I start a bebo specific sub project, or. . . > > > > Thanks, > > BJ > > ----- > > BJ Clark > > the science department > > bjclark at scidept.com > > www.scidept.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 > >
Hey BJ, take a look at facebook_session_handling this seems like a good place to figure this out. You could set somthing up on the CGI:Session that would indicate which context you are in. I am CC the list here so that others can get a feel for what the issues are. Dave On Feb 6, 2008 9:12 PM, BJ Clark <bjclark at scidept.com> wrote:> Dave, > Thanks, yeah, I thought params might be available in the plugin''s > context. > bebo sends a fb_sig_network url parameter on all requests, so we''re > trying to use this as a basis of setting up the correct session using > the correct api and secret keys. Any thoughts on how we could make > that parameter available there? My rails plugin development fu is > weak. :) > > Thanks, > ----- > BJ Clark > the science department > bjclark at scidept.com > www.scidept.com > > > > On Feb 6, 2008, at 8:47 PM, David Clements wrote: > > > Hey BJ, > > > > On first pass I am wondering where are you getting ''params'' from? > > > > I think you are catching an exception there and the rescue is taking > > care of it. > > > > Just a guess, I didn''t try it. > > > > Dave > > > > On Feb 6, 2008 5:46 PM, BJ Clark <bjclark at scidept.com> wrote: > >> > >> My co-worker and have been working on this all day. I think we''re > >> pretty > >> close, but I''m having a problem trying to modify session.rb to work > >> wtih > >> both bebo and facebook support. > >> > >> Here''s what I''ve done: > >> I changed facebooker.yml to have a bebo_secret_key, bebo_api_key, > >> etc. > >> Then, in init.rb I did: > >> > >> > >> facebook_config = "#{RAILS_ROOT}/config/facebooker.yml" > >> > >> if File.exist?(facebook_config) > >> FACEBOOKER = YAML.load_file(facebook_config)[RAILS_ENV] > >> ENV[''FACEBOOK_API_KEY''] = FACEBOOKER[''api_key''] > >> ENV[''FACEBOOK_SECRET_KEY''] = FACEBOOKER[''secret_key''] > >> ENV[''FACEBOOKER_RELATIVE_URL_ROOT''] = FACEBOOKER[''canvas_page_name''] > >> ENV["FACEBOOK_CANVAS_PATH"] = ''blah_blah'' > >> ENV[''BEBO_API_KEY''] = FACEBOOKER[''bebo_api_key''] > >> ENV[''BEBO_SECRET_KEY''] = FACEBOOKER[''bebo_secret_key''] > >> ENV[''BEBO_RELATIVE_URL_ROOT''] = FACEBOOKER[''bebo_canvas_page_name''] > >> ENV["BEBO_CANVAS_PATH"] = ''blah_blah'' > >> end > >> > >> So, then in session.rb I see that this gets called when it goes to > >> secure > >> the session: > >> def self.secret_key > >> extract_key_from_environment(:secret) || > >> extract_key_from_configuration_file(:secret) rescue > >> report_inability_to_find_key(:secret) > >> end > >> > >> > >> and that should be calling the extract_key_from_environment method. > >> So I modified it to look like this (and this is where I get stuck): > >> > >> > >> def self.extract_key_from_environment(key_name) > >> if params[:fb_sig_network] == "Bebo" > >> logger.debug "Extracting bebo #{key_name.to_s}" > >> val = ENV["BEBO_" + key_name.to_s.upcase + "_KEY"] > >> else > >> logger.debug "Extracting facebook #{key_name.to_s}" > >> val = ENV["FACEBOOK_" + key_name.to_s.upcase + "_KEY"] > >> end > >> end > >> > >> I always get the error "Facebooker::Session::ConfigurationMissing > >> (Could not > >> find configuration information for secret):" > >> The logger.debug message never get called (which really confuses me). > >> Now, If use the code that is currently in the plugin, I have no > >> problem on > >> facebook, and bebo gives me the IncorrectSignature error, which is > >> the > >> correct behavior. > >> > >> I don''t understand why it''s failing like this. > >> Anyone have any suggestions? > >> > >> Thanks, > >> ----- > >> BJ Clark > >> the science department > >> bjclark at scidept.com > >> www.scidept.com > >> > >> > >> > >> Hey BJ, > >> > >> I am in the middle of a release right now but would love to start > >> looking at this next week. We talked about this awhile ago on the > >> list and Mike wanted to work on it in parallel, get it working, then > >> look at how you could merge it in. > >> > >> Dave > >> > >> > >> On Feb 5, 2008 2:54 PM, BJ Clark <bjclark at scidept.com> wrote: > >>> Seeing as how Bebo''s platform is so close to Facebook''s, it makes > >>> sense to me to build in Bebo support to Facebooker. > >>> Is anyone working on this yet and would you guys be open to > >>> accepting > >>> patches for this? > >>> Or should I start a bebo specific sub project, or. . . > >>> > >>> Thanks, > >>> BJ > >>> ----- > >>> BJ Clark > >>> the science department > >>> bjclark at scidept.com > >>> www.scidept.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 > >> > >> > >