Question

I've created a FB application, hosted on Heroku. The app is written in Ruby.

  1. The app used to load correctly inside facebook iframe.
  2. Now, if I open the app through app.facebook.com/app_namespace, an empty screen is shown. When I have enabled exception trace, it now shows as if the access_token for graph koala object is nil.
  3. If I open Canvas URL, e.g. the "direct" URL everything works fine, but I have to first call direct authroization on facebook through "/auth/facebook".
  4. The iframe now shows koala "Unsupported get method", but through debugging it is evident that access_token obtained from graph is nil.
  5. Behavior is the same for generated test users as well as developer users.

Already tried:

  1. I've tried to debug the Canvas URL through online FB debugger, and Scraper seems to see correct HTML.
  2. Try to reauthorize the app, to no avail.
Was it helpful?

Solution

By default Sinatra uses rack-protection to set the X-Frame_Options header. It looks like this is what is causing your problems.

You can disable it with this line in your application:

set :protection, :except => :frame_options
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top