ruby on rails で作成された私のアプリは、omniauth および omniauth-facebook gem を使用しています。「Facebookでログイン」ボタンで構成されています。ローカルホストでは問題なく動作します - 人々は Facebook でログインできます - しかし、ライブサーバーでは動作しません。私が見る限り、関連する詳細を変更しましたが、欠けているものはありますか?
前述のとおり、localhost:3000 では正常に動作します。www.example.com で動作するようにこれらの詳細を変更しましたが、エラー メッセージが引き続き表示されます。
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.
config/oauth.yml ファイルには次のものがあります。
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"
Facebook で作成したアプリケーションの ID とシークレットに一致するように、「プロダクション」の app_id と app_secret を変更しました。
環境/ production.rb に次のように記述しました:
# Need this here for mailing purposes
config.action_mailer.default_url_options = { :host => 'www.example.com' }
environment/development.rb に次のように記述しました:
# 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' }
私は何かを見落としていますか?ID とシークレットが表示されている Facebook アプリのセクションを変更する必要があるのではないでしょうか。どんな助けでも大歓迎です。