문제

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.
도움이 되었습니까?

해결책

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
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top