我的應用程序使用ruby在rails上製作,使用omniauth和omniauth-facebook寶石。它包含一個'用Facebook登錄'按鈕。它在localhost中工作正常 - 人們可以使用Facebook登錄 - 但我無法在我的活動服務器上運行。據我所知,我已經改變了相關的細節,但是有什麼我錯過了?ruby on rails omniauth和omniauth-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.
在我的配置/ 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"
我已經更改了'製作'中的app_id和app_secret,以匹配我在Facebook中創建的應用程序的ID和祕密。
在環境/ production.rb我已經把:
# Need this here for mailing purposes
config.action_mailer.default_url_options = { :host => 'www.example.com' }
在環境/ 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' }
我俯瞰的東西嗎?也許我需要改變我的Facebook Apps部分,它給了我身份和祕密?任何幫助,將不勝感激。
什麼是您的應用程序域設置?它是'example.com'嗎? –
在Facebook上它說'應用程序域名'我有www.example.com。 – CHarris
而在'與Facebook登錄網站,網站地址:'我有http://www.example.com/ – CHarris