<div dir="ltr">I ran across a bug a little while ago where link_to&#39;s in generated
content were not in the scope of the application callback url. This is
because facebook does not pass the &quot;fb_sig_in_canvas&quot; 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>&nbsp;&nbsp;&nbsp;&nbsp; def link_to_canvas?(params, options)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; option_override = options[:canvas]<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return false if option_override == false # important to check for false. nil should use default behavior<br>

-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; option_override || @request.parameters[&quot;fb_sig_in_canvas&quot;] == &quot;1&quot; ||&nbsp; @request.parameters[:fb_sig_in_canvas] == &quot;1&quot; <br>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; option_override || (@request.parameters[&quot;fb_sig_in_canvas&quot;] == &quot;1&quot;) ||&nbsp; (@request.parameters[:fb_sig_in_canvas] == &quot;1&quot;) || (@request.parameters[:fb_sig_is_ajax]==&quot;1&quot;)<br>

&nbsp;&nbsp;&nbsp;&nbsp; end<br>&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; def rewrite_url_with_facebooker(*args)<br><br>Can anyone confirm that this looks like the right way to do it? It&#39;d be nice to get this fixed in the official branch but I&#39;m not sure if there might be something I overlooked.<br>
<br>Best,<br>George<br>
</div></div>