RailsCasts Pro episodes are now free!

Learn more or hide this

Yarin Benado's Profile

GitHub User: yarinb

Site: https://twitter.com/yarinb

Comments by Yarin Benado

Avatar

UPDATE: deployed the test app on Heroku and everything works so I guess it is some facebook domain issue. Still no go for localhost.

Avatar

I followed the screencast step by step and couldn't get the login redirection working.
After approving the app with FB's dialog, i'm being redirected to a permissions request dialog and then all I get is a blank page as seen in the screenshot:

the contents of the dialog is the following javascript snippet

html
<script type="text/javascript">
var message = "cb=f3f46734&origin=http\u00253A\u00252F\u00252Flocalhost\u00253A3000\u00252Fffa487e6c&domain=localhost&relation=opener&frame=f251e19854&access_token=AAACsO0WgThwBAOjbW8ItSOhsHvPFhrzegH2tIVMZCmIgyYkObv1qeD23DVEMsP6Co7ENGBiKEFICEPZBHnzwNO9cbpRoilq9YpLKcuJAZDZD&expires_in=5110&signed_request=doBGkVVmt5I-FsXsL2Wy76SPTHgxftRpEy2yjS_nePs.eyJhbGdvcml0aG0iOiJITUFDLVNIQTI1NiIsImNvZGUiOiJBUUIxWnlwWVI2X1VaQzE2TmJqdnB3VHk3dzZSc0pHY3NVVHhRNWZJR2NmWGxZRUZoLVpOQTQ5ekpBc1FlLWpjVlhXdDl3RzRDWmU0U2d2RnVtcDdmdDUzbWNuWDNzcUdKZlU5WWVKQkg2TzJDb3dKTTBrTjFtU1F6N1pXOENBSEZwVENnaWVZbUg2UndyY28yT1dJaFk4TFZqQmg4QTRkdDVJUDNJUFM3MmppMkFkb3RpenVHb0R6NnJJVzE2eFh4QUUiLCJpc3N1ZWRfYXQiOjEzNDEwNDUyOTAsInVzZXJfaWQiOiI4ODM5MzUwMjIifQ&base_domain=localhost", origin = "http:\/\/localhost:3000\/ffa487e6c", domain = "localhost";document.domain='facebook.com';(function(){var a=window.opener||window.parent,b='fb_xdm_frame_'+location.protocol.replace(':','');function c(){try{a.frames[b].proxyMessage(message,[domain]);}catch(e){setTimeout(c,100);}}function d(){__fbNative.postMessage(message,origin);}if(window===top&&/FBAN\/\w+;/i.test(navigator.userAgent)){if(window.__fbNative&&__fbNative.postMessage){d();}else window.addEventListener('fbNativeReady',d);}else c();})();

</script>

I'm suspecting Facebook's strict policies with XSS and same-site origin requests but it worked for Ryan...

Maybe one of you wonderful readers have bumped into this "undebuggable" weird behavior?