<div dir="ltr"><p>Whenever a user adds my application Facebooker will throw a Facebooker::Session::IncorrectSignature exception. Upon further investigation I was finding that while the expected signature was blank, the actual signature was the facebook app secret key. why is this happening?<br>
</p><p>Processing FacebookGroupsController#index (for <a href="http://127.0.0.1">127.0.0.1</a> at 2008-07-21 08:58:34) [GET]<br>&nbsp; Session ID: hfiauwhfiuwafwfhuiwhf<br>&nbsp; Parameters: {&quot;action&quot;=&gt;&quot;index&quot;, &quot;installed&quot;=&gt;&quot;1&quot;, &quot;controller&quot;=&gt;&quot;facebook_groups&quot;, &quot;auth_token&quot;=&gt;&quot;afewagwgawgwefawefwefawefw&quot;}</p>
<p><br>Facebooker::Session::IncorrectSignature (Facebooker::Session::IncorrectSignature):<br>&nbsp;   /vendor/plugins/facebooker/lib/facebooker/rails/controller.rb:110:in `verify_signature&#39;<br>&nbsp;   /vendor/plugins/facebooker/lib/facebooker/rails/controller.rb:95:in `verified_facebook_params&#39;<br>
&nbsp;   /vendor/plugins/facebooker/lib/facebooker/rails/controller.rb:35:in `facebook_params&#39;<br>&nbsp;   /vendor/plugins/facebooker/lib/facebooker/rails/controller.rb:45:in `valid_session_key_in_session?&#39;<br>&nbsp;   /vendor/plugins/facebooker/lib/facebooker/rails/controller.rb:41:in `session_already_secured?&#39;<br>
&nbsp;   /vendor/plugins/facebooker/lib/facebooker/rails/controller.rb:26:in `set_facebook_session&#39;<br>&nbsp;   /vendor/plugins/facebooker/lib/facebooker/rails/controller.rb:176:in `ensure_authenticated_to_facebook&#39;<br>&nbsp;   /vendor/plugins/facebooker/lib/facebooker/rails/controller.rb:181:in `ensure_application_is_installed_by_facebook_user&#39;<br>
&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/callbacks.rb:173:in `send&#39;<br>&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/callbacks.rb:173:in `evaluate_method&#39;<br>
&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/callbacks.rb:161:in `call&#39;<br>&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/filters.rb:430:in `call&#39;<br>&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/filters.rb:592:in `run_before_filters&#39;<br>
&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/filters.rb:578:in `call_filters&#39;<br>&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/filters.rb:573:in `perform_action_without_benchmark&#39;<br>
&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue&#39;<br>&nbsp;   /opt/local/lib/ruby/1.8/benchmark.rb:293:in `measure&#39;<br>&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue&#39;<br>
&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/rescue.rb:201:in `perform_action_without_caching&#39;<br>&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/caching/sql_cache.rb:13:in `perform_action&#39;<br>
&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/abstract/query_cache.rb:33:in `cache&#39;<br>&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/query_cache.rb:8:in `cache&#39;<br>
&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/caching/sql_cache.rb:12:in `perform_action&#39;<br>&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:529:in `send&#39;<br>
&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:529:in `process_without_filters&#39;<br>&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/filters.rb:569:in `process_without_session_management_support&#39;<br>
&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/session_management.rb:130:in `process&#39;<br>&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:389:in `process&#39;<br>
&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:149:in `handle_request&#39;<br>&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:107:in `dispatch&#39;<br>
&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:104:in `synchronize&#39;<br>&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:104:in `dispatch&#39;<br>
&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:120:in `dispatch_cgi&#39;<br>&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:35:in `dispatch&#39;<br>
&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:76:in `process&#39;<br>&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:74:in `synchronize&#39;<br>&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:74:in `process&#39;<br>
&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:159:in `process_client&#39;<br>&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in `each&#39;<br>&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in `process_client&#39;<br>
&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `run&#39;<br>&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `initialize&#39;<br>&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `new&#39;<br>
&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `run&#39;<br>&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `initialize&#39;<br>&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `new&#39;<br>
&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `run&#39;<br>&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:282:in `run&#39;<br>&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:281:in `each&#39;<br>
&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:281:in `run&#39;<br>&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:128:in `run&#39;<br>&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/command.rb:212:in `run&#39;<br>
&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:281<br>&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:502:in `load&#39;<br>&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:502:in `load&#39;<br>
&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:354:in `new_constants_in&#39;<br>&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:502:in `load&#39;<br>
&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/commands/servers/mongrel.rb:64<br>&nbsp;   /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require&#39;<br>&nbsp;   /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:27:in `require&#39;<br>
&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in `require&#39;<br>&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:354:in `new_constants_in&#39;<br>
&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in `require&#39;<br>&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/commands/server.rb:39<br>&nbsp;   /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require&#39;<br>
&nbsp;   /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:27:in `require&#39;<br>&nbsp;   script/server:3<br><br><br></p><p>If I account for the signature to be blank on install, I get a SignatureTooOld exception; since facebook_sig_params[&#39;time&#39;] is an empty value</p>
<p>acebooker::Session::SignatureTooOld (Facebooker::Session::SignatureTooOld):<br>&nbsp;   /vendor/plugins/facebooker/lib/facebooker/rails/controller.rb:112:in `verify_signature&#39;<br>&nbsp;   /vendor/plugins/facebooker/lib/facebooker/rails/controller.rb:95:in `verified_facebook_params&#39;<br>
&nbsp;   /vendor/plugins/facebooker/lib/facebooker/rails/controller.rb:35:in `facebook_params&#39;<br>&nbsp;   /vendor/plugins/facebooker/lib/facebooker/rails/controller.rb:45:in `valid_session_key_in_session?&#39;<br>&nbsp;   /vendor/plugins/facebooker/lib/facebooker/rails/controller.rb:41:in `session_already_secured?&#39;<br>
&nbsp;   /vendor/plugins/facebooker/lib/facebooker/rails/controller.rb:26:in `set_facebook_session&#39;<br>&nbsp;   /vendor/plugins/facebooker/lib/facebooker/rails/controller.rb:176:in `ensure_authenticated_to_facebook&#39;<br>&nbsp;   /vendor/plugins/facebooker/lib/facebooker/rails/controller.rb:181:in `ensure_application_is_installed_by_facebook_user&#39;<br>
&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/callbacks.rb:173:in `send&#39;<br>&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/callbacks.rb:173:in `evaluate_method&#39;<br>
&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/callbacks.rb:161:in `call&#39;<br>&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/filters.rb:430:in `call&#39;<br>&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/filters.rb:592:in `run_before_filters&#39;<br>
&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/filters.rb:578:in `call_filters&#39;<br>&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/filters.rb:573:in `perform_action_without_benchmark&#39;<br>
&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue&#39;<br>&nbsp;   /opt/local/lib/ruby/1.8/benchmark.rb:293:in `measure&#39;<br>&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue&#39;<br>
&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/rescue.rb:201:in `perform_action_without_caching&#39;<br>&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/caching/sql_cache.rb:13:in `perform_action&#39;<br>
&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/abstract/query_cache.rb:33:in `cache&#39;<br>&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/query_cache.rb:8:in `cache&#39;<br>
&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/caching/sql_cache.rb:12:in `perform_action&#39;<br>&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:529:in `send&#39;<br>
&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:529:in `process_without_filters&#39;<br>&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/filters.rb:569:in `process_without_session_management_support&#39;<br>
&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/session_management.rb:130:in `process&#39;<br>&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:389:in `process&#39;<br>
&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:149:in `handle_request&#39;<br>&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:107:in `dispatch&#39;<br>
&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:104:in `synchronize&#39;<br>&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:104:in `dispatch&#39;<br>
&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:120:in `dispatch_cgi&#39;<br>&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:35:in `dispatch&#39;<br>
&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:76:in `process&#39;<br>&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:74:in `synchronize&#39;<br>&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:74:in `process&#39;<br>
&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:159:in `process_client&#39;<br>&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in `each&#39;<br>&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in `process_client&#39;<br>
&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `run&#39;<br>&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `initialize&#39;<br>&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `new&#39;<br>
&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `run&#39;<br>&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `initialize&#39;<br>&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `new&#39;<br>
&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `run&#39;<br>&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:282:in `run&#39;<br>&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:281:in `each&#39;<br>
&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:281:in `run&#39;<br>&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:128:in `run&#39;<br>&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/command.rb:212:in `run&#39;<br>
&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:281<br>&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:502:in `load&#39;<br>&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:502:in `load&#39;<br>
&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:354:in `new_constants_in&#39;<br>&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:502:in `load&#39;<br>
&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/commands/servers/mongrel.rb:64<br>&nbsp;   /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require&#39;<br>&nbsp;   /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:27:in `require&#39;<br>
&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in `require&#39;<br>&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:354:in `new_constants_in&#39;<br>
&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in `require&#39;<br>&nbsp;   /opt/local/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/commands/server.rb:39<br>&nbsp;   /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require&#39;<br>
&nbsp;   /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:27:in `require&#39;<br>&nbsp;   script/server:3<br><br><br></p><p>When I account for both the session and the signature, I get a &quot;You&#39;ve already installed this application&quot; message from Facebook</p>
<p>Processing FacebookGroupsController#index (for <a href="http://127.0.0.1">127.0.0.1</a> at 2008-07-21 08:52:35) [GET]<br>&nbsp; Session ID: cfb49392aw667c9f45fwefwef<br>&nbsp; Parameters: {&quot;action&quot;=&gt;&quot;index&quot;, &quot;installed&quot;=&gt;&quot;1&quot;, &quot;controller&quot;=&gt;&quot;facebook_groups&quot;, &quot;auth_token&quot;=&gt;&quot;e4awa52fweafweafwcb79f1438afwegagw3&quot;}<br>
Redirected to <a href="http://www.facebook.com/install.php?api_key=92b0f6e88wafawgwgwawafwffawf01&amp;v=1.0&amp;next=%2Ffacebook_groups%2Findex%3Finstalled%3D1%26">http://www.facebook.com/install.php?api_key=92b0f6e88wafawgwgwawafwffawf01&amp;v=1.0&amp;next=%2Ffacebook_groups%2Findex%3Finstalled%3D1%26</a><br>
Filter chain halted as [:ensure_application_is_installed_by_facebook_user] rendered_or_redirected.<br>Completed in 0.25199 (3 reqs/sec) | DB: 0.01752 (6%) | 302 Found [<a href="http://xxxxx.com/?auth_token=e44bf8c2a524f0fwafwagwaegaweawe&amp;installed=1">http://xxxxx.com/?auth_token=e44bf8c2a524f0fwafwagwaegaweawe&amp;installed=1</a>]<br>
<br>I&#39;m running on rails 2.1 ruby 1.86, but this has also happened on rails 2.0 and pre-2.0 versions.<br></p><p>Thanks in advance to anyone that can help - I&#39;m at a complete loss.</p></div>