私はこれを機能させるために長い間試みてきましたが、成功しませんでした。私の oauth.yml ファイルでは、app_id と secret_id が Facebook アプリの設定と一致しています。未解決の構成の問題がある場合に備えて、サーバーを再起動しました。何が問題なのですか?
私は得続けます:
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
これは、私の Facebook アプリ設定のスクリーンショットです。
私の fb.init.html.erb ファイルは次のようになります。
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
// console.log("fbinit file");
FB.init({
appId : '<%= OAUTH_CONFIG['facebook']['app_id'] %>',
status : true,
cookie : true,
xfbml : true,
oauth : true
});
};
(function(d){
// console.log("fbinit file2");
var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
js = d.createElement('script'); js.id = id; js.async = true;
js.src = "//connect.facebook.net/en_US/all.js";
d.getElementsByTagName('head')[0].appendChild(js);
}(document));
</script>
助けてくれてありがとう。