<div dir="ltr">I ran across a bug a little while ago where link_to's in generated
content were not in the scope of the application callback url. This is
because facebook does not pass the "fb_sig_in_canvas" parameter for
ajax requests (but it does pass fb_sig_is_ajax)<br>
<br>
The following is the fix that I used:<br>
<br>
diff --git a/lib/facebooker/rails/
<div dir="ltr">facebook_url_rewriting.rb b/lib/facebooker/rails/facebook_url_rewriting.rb<br>index 72807db..7dad529 100644<br>--- a/lib/facebooker/rails/facebook_url_rewriting.rb<br>
+++ b/lib/facebooker/rails/facebook_url_rewriting.rb<br>@@ -13,7 +13,7 @@ module ::ActionController<br> def link_to_canvas?(params, options)<br> option_override = options[:canvas]<br> return false if option_override == false # important to check for false. nil should use default behavior<br>
- option_override || @request.parameters["fb_sig_in_canvas"] == "1" || @request.parameters[:fb_sig_in_canvas] == "1" <br>+ option_override || (@request.parameters["fb_sig_in_canvas"] == "1") || (@request.parameters[:fb_sig_in_canvas] == "1") || (@request.parameters[:fb_sig_is_ajax]=="1")<br>
end<br> <br> def rewrite_url_with_facebooker(*args)<br><br>Can anyone confirm that this looks like the right way to do it? It'd be nice to get this fixed in the official branch but I'm not sure if there might be something I overlooked.<br>
<br>Best,<br>George<br>
</div></div>