Facebook認証を使用するアプリがあります。最新のブラウザーを使用している場合、ユーザーは問題なくログインできます。すなわち7と8では、次のことが起こります -
ユーザーがログインボタンをクリックします。Facebook のログイン ウィンドウがポップアップします。ユーザーは詳細を入力し、[送信] をクリックします。ポップアップは開いたままになり、次の URL の空白のページに移動します - https://my-app.heroku.com/channel.html?fb_xd_fragment#?=LotsOfRandomUrlParamaters
私のコードは次のようになります -
<div id="container" class="facebook_tab" >
<div id="fb-root"></div>
<script type="text/javascript">
window.fbAsyncInit = function() {
FB.init({
appId : 'myappid',
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true, // parse XFBML
oauth : false,
channelUrl : 'https://my-app.heroku.com/channel.html'
});
var e = document.createElement('script');
e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
e.async = true;
document.getElementById('fb-root').appendChild(e);
}());
</script>
この宝石を使用したレールアプリです - https://github.com/fionnbharra/facebooker2 - しかし、それが問題の原因だとは思いません。
ログインボタンを生成するために使用されるレールコードは次のようになります-
<%= fb_login(:text=>"Log in") do %>
top.location.href='<%= APP_CONFIG[:my_app_url] %>';
<% end %>
ここで何が起こっているのか誰にも分かりますか?