title: Rails 4 as IFrame Facebook application
body: <p>I have problem with my fb application. I use this tutorial: <a href="http://3adly.blogspot.com/2012/12/ruby-on-rails-facebook-application.html" rel="nofollow">http://3adly.blogspot.com/2012/12/ruby-on-rails-facebook-application.html</a> I have app hosated on Heroku and box with authorization request doesn't work if i use app as iframe (<a href="https://apps.facebook.com/my-app" rel="nofollow">https://apps.facebook.com/my-app</a>). In chromium console i see error: </p>
  
  <pre><code>Refused to display 'https://www.facebook.com/dialog/oauth?client_id=123...%2Fmy-app.herokuapp.com%2F%2F&amp;scope=read_stream' in a frame because it set 'X-Frame-Options' to 'DENY'. 
  </code></pre>
  
  <p>But I have correct x-auth value im my config/application.rb:</p>
  
  <pre><code>module TestApp
   class Application &lt; Rails::Application
   # Settings in config/environments/* take precedence over those specified here.
   # Application configuration should go into files in config/initializers
   # -- all .rb files in that directory are automatically loaded.
  
   # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
   # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
   # config.time_zone = 'Central Time (US &amp; Canada)'
  
   # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
   # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
   # config.i18n.default_locale = :de
   config.action_dispatch.default_headers = {
    'X-Frame-Options' =&gt; 'ALLOWALL'
   }
   end
  end
  </code></pre>
  
  <p>When I use my app standalone (<a href="https://my-app.heroku.com" rel="nofollow">https://my-app.heroku.com</a>) I see box with "permissions request", when I click OK my app works in IFrame and standalone. MY app works correctly, because I can see "Hi Grzegorz", in my view I have Hi &lt;%= @user_profile["first_name"] %>!. 
  This is weird for me, why I don't see box with permissions request in IFrame?</p>