Q:

Facebook Open Graph Action + Rails: return JSON or HTML

I've implemented Facebook's Open Graph per Ryan Bates' awesome tutorial: http://railscasts.com/episodes/363-facebook-open-graph
However, when Facebook is scraping my site to retrieve the og parameters, it looks like it's asking for JSON format. That's a problem since I'm already using JSON to return data for other purposes. I'm ok returning data for Facebook via format.html. I checked the request object and I see this ACCEPT header: 
'HTTP_ACCEPT' */*

However, that's causing my app to execute format.json. I played around with the order of the format responses and it still requests format.json. 
respond_with(@project) do |format|
    format.html { render 'show'}
    format.json { render 'show'}
    format.js { render 'show'}
end

Any ideas?

A:

After a lot of trial and error, I figured out that with an Accept Header of */*, and if you are using respond_with, you'll need to make sure the respond_to at the top of the controller matches the order you want... In my case, this is correct:
class ProjectsController < ApplicationController
  respond_to :html
  respond_to :json
  respond_to :js,
  ...

and this isn't
class ProjectsController < ApplicationController
  respond_to :json
  respond_to :html
  respond_to :js,
  ...

