I have problem with my fb application. I use this tutorial: http://3adly.blogspot.com/2012/12/ruby-on-rails-facebook-application.html I have app hosated on Heroku and box with authorization request doesn't work if i use app as iframe (https://apps.facebook.com/my-app). In chromium console i see error:
Refused to display 'https://www.facebook.com/dialog/oauth?client_id=123...%2Fmy-app.herokuapp.com%2F%2F&scope=read_stream' in a frame because it set 'X-Frame-Options' to 'DENY'.
But I have correct x-auth value im my config/application.rb:
module TestApp
class Application < 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 & 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' => 'ALLOWALL'
}
end
end
When I use my app standalone (https://my-app.heroku.com) 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 <%= @user_profile["first_name"] %>!. This is weird for me, why I don't see box with permissions request in IFrame?