title: facebook open graph crawler triggering json response in rails actions
body: <p>For some reason the facebook crawler is triggering the json response in my rails actions. This causes the action to just return a json representation of the object, without the normal html markup + open graph tags. I have tested this with rails 3.2.6. I use the facebook open graph debugger to see what the scraper is seeing: <a href="http://developers.facebook.com/tools/debug">http://developers.facebook.com/tools/debug</a>.</p>
  
  <p>The code is very simple. Imagine a simple "show" action for an object, for example a User. It ends with:</p>
  
  <pre><code>respond_to do |format|
    format.js { render :json =&gt; @this.to_json }
    format.html
  end
  </code></pre>
  
  <p>The facebook crawler is triggering the format.js, which causes the open graph tags to not be rendered. Any ideas why this might happen or how to fix it? Thanks.</p>