Is there an issue with facebooker or my code? here is the error: "/Library/Ruby/Gems/1.8/gems/facebooker-0.9.5/lib/facebooker/parser.rb:345:in `process'': Invalid parameter (Facebooker::Session::MissingOrInvalidParameter) from /Library/Ruby/Gems/1.8/gems/facebooker-0.9.5/lib/facebooker/parser.rb:15:in `parse'' from /Library/Ruby/Gems/1.8/gems/facebooker-0.9.5/lib/facebooker/service.rb:13:in `post'' from /Library/Ruby/Gems/1.8/gems/facebooker-0.9.5/lib/facebooker/session.rb:321:in `post'' from /Library/Ruby/Gems/1.8/gems/facebooker-0.9.5/lib/facebooker/session.rb:137:in `secure!'' from /Library/Ruby/Gems/1.8/gems/facebooker-0.9.5/lib/facebooker/session.rb:368:in `uid'' from /Library/Ruby/Gems/1.8/gems/facebooker-0.9.5/lib/facebooker/session.rb:167:in `user'' from ./fbook.rb:15 " code: " #!/usr/bin/env ruby require ''rubygems'' require ''facebooker'' # ensure_application_is_installed_by_facebook_user session = Facebooker::Session.create(''mykey'', ''mysecret'') puts "Paste the URL into your web browser and login" puts session.login_url() puts "Hit return to continue..." gets puts "What are you doing?" puts "#{session.user.facebook_id}" " -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/facebooker-talk/attachments/20090214/96ed4e0b/attachment.html>
THis is the code that I have working. I think you need to call auth_token which will request a token. session = Facebooker::Session.create( ''''APIKEY'', ''SECRET'' ) puts session.auth_token #this makes the call to get auth token puts "Paste the URL into your web browser and login:" puts session.login_url + "&auth_token=#{session.auth_token}"; puts "Hit return to continue..." gets puts "What are you doing?" puts "#{session.user.name} #{session.user.status.message}" On Sat, Feb 14, 2009 at 1:27 PM, Lee Connell <lee.a.connell at gmail.com>wrote:> Is there an issue with facebooker or my code? here is the error: > "/Library/Ruby/Gems/1.8/gems/facebooker-0.9.5/lib/facebooker/parser.rb:345:in > `process'': Invalid parameter > (Facebooker::Session::MissingOrInvalidParameter) > from > /Library/Ruby/Gems/1.8/gems/facebooker-0.9.5/lib/facebooker/parser.rb:15:in > `parse'' > from > /Library/Ruby/Gems/1.8/gems/facebooker-0.9.5/lib/facebooker/service.rb:13:in > `post'' > from > /Library/Ruby/Gems/1.8/gems/facebooker-0.9.5/lib/facebooker/session.rb:321:in > `post'' > from > /Library/Ruby/Gems/1.8/gems/facebooker-0.9.5/lib/facebooker/session.rb:137:in > `secure!'' > from > /Library/Ruby/Gems/1.8/gems/facebooker-0.9.5/lib/facebooker/session.rb:368:in > `uid'' > from > /Library/Ruby/Gems/1.8/gems/facebooker-0.9.5/lib/facebooker/session.rb:167:in > `user'' > from ./fbook.rb:15 > " > > code: > > " > #!/usr/bin/env ruby > require ''rubygems'' > require ''facebooker'' > > # ensure_application_is_installed_by_facebook_user > > session = Facebooker::Session.create(''mykey'', ''mysecret'') > > puts "Paste the URL into your web browser and login" > puts session.login_url() > puts "Hit return to continue..." > gets > puts "What are you doing?" > puts "#{session.user.facebook_id}" > " > > _______________________________________________ > 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/20090214/38684108/attachment-0001.html>
Don''t use the Desktop Session. It has been deprecated by Facebook. You should be able to create a session with the code I sent. I am using it in a non-web app. Dave On Sat, Feb 14, 2009 at 3:44 PM, Lee Connell <lee.a.connell at gmail.com>wrote:> thanks for the quick response, here is my code below and now i am getting > "IncorrectSignature" (from > /Library/Ruby/Gems/1.8/gems/facebooker-0.9.5/lib/facebooker/model.rb:35:in > `name'' from ./fbook.rb:14) > > #!/usr/bin/env ruby > require ''rubygems'' > require ''facebooker'' > > session = Facebooker::Session::Desktop.create(''mykey'', ''mysecret'') > puts session.auth_token() > > puts "Paste the URL into your web browser and login" > puts session.login_url() > puts "Hit return to continue..." > gets > puts "#{session.auth_token()}" > puts "#{session.user.name} #{session.user.status.message}" > > friends = session.user.friends!( :name, :status ) > friends.each do |friend| > puts "#{friend.name} #{friend.status.message}" > end > > > > On Sat, Feb 14, 2009 at 5:34 PM, David Clements <digidigo at gmail.com>wrote: > >> THis is the code that I have working. I think you need to call auth_token >> which will request a token. >> >> >> session = Facebooker::Session.create( ''''APIKEY'', ''SECRET'' ) >> >> puts session.auth_token #this makes the call to get auth token >> >> >> puts "Paste the URL into your web browser and login:" >> puts session.login_url + "&auth_token=#{session.auth_token}"; >> >> puts "Hit return to continue..." >> gets >> >> >> >> puts "What are you doing?" >> puts "#{session.user.name} #{session.user.status.message}" >> >> >> >> >> >> On Sat, Feb 14, 2009 at 1:27 PM, Lee Connell <lee.a.connell at gmail.com>wrote: >> >>> Is there an issue with facebooker or my code? here is the error: >>> "/Library/Ruby/Gems/1.8/gems/facebooker-0.9.5/lib/facebooker/parser.rb:345:in >>> `process'': Invalid parameter >>> (Facebooker::Session::MissingOrInvalidParameter) >>> from >>> /Library/Ruby/Gems/1.8/gems/facebooker-0.9.5/lib/facebooker/parser.rb:15:in >>> `parse'' >>> from >>> /Library/Ruby/Gems/1.8/gems/facebooker-0.9.5/lib/facebooker/service.rb:13:in >>> `post'' >>> from >>> /Library/Ruby/Gems/1.8/gems/facebooker-0.9.5/lib/facebooker/session.rb:321:in >>> `post'' >>> from >>> /Library/Ruby/Gems/1.8/gems/facebooker-0.9.5/lib/facebooker/session.rb:137:in >>> `secure!'' >>> from >>> /Library/Ruby/Gems/1.8/gems/facebooker-0.9.5/lib/facebooker/session.rb:368:in >>> `uid'' >>> from >>> /Library/Ruby/Gems/1.8/gems/facebooker-0.9.5/lib/facebooker/session.rb:167:in >>> `user'' >>> from ./fbook.rb:15 >>> " >>> >>> code: >>> >>> " >>> #!/usr/bin/env ruby >>> require ''rubygems'' >>> require ''facebooker'' >>> >>> # ensure_application_is_installed_by_facebook_user >>> >>> session = Facebooker::Session.create(''mykey'', ''mysecret'') >>> >>> puts "Paste the URL into your web browser and login" >>> puts session.login_url() >>> puts "Hit return to continue..." >>> gets >>> puts "What are you doing?" >>> puts "#{session.user.facebook_id}" >>> " >>> >>> _______________________________________________ >>> 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/20090214/d30729e1/attachment.html>