My app, made in ruby on rails, uses omniauth and omniauth-facebook gems. It consists of a 'Log In with Facebook' button. It works fine in localhost - people can log in with Facebook - but I can't get it working on my live server. As far as I can see I've changed the relevant details, but is there something I'm missing?
As I said, it works fine in localhost:3000. I've changed these details to try get it working at www.example.com, but I keep getting the error message:
Given URL is not permitted by the application configuration.: One or more of the given URLs is not allowed by the App's settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App's domains.
In my config/oauth.yml file I have:
development:
facebook:
app_id: "12345"
app_secret: "abcde"
options:
scope: "email"
display: "page"
staging: &staging
facebook:
app_id: "12345"
app_secret: "abcde"
options:
scope: "email"
display: "page"
test:
<<: *staging
production:
facebook:
app_id: "12345678"
app_secret: "abcdefgh"
I've changed the app_id and app_secret in 'production' to match my the id and secret of my application, which I made in Facebook.
In environments/production.rb I've put:
# Need this here for mailing purposes
config.action_mailer.default_url_options = { :host => 'www.example.com' }
In environments/development.rb I've put:
# Don't care if the mailer can't send
config.action_mailer.raise_delivery_errors = true
config.action_mailer.default_url_options = { :host => 'www.example.com' }
Am I overlooking something? Maybe there's something I need to change in my Facebook Apps section, where it gave me the id and secret? Any help would be appreciated.