I am using the JS SDK to enter my site and I have this code in my page
<div id="fb-root"></div> <script type="text/javascript"> window.fbAsyncInit = function() { FB.init({"appId":"xxxxxxxxxxxxxx","xfbml":true,"oauth":true,"status":false,"cookie":true,"logging":false}); onFbInit(); }; (function() { 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> <fb:login-button scope="email" autologoutlink="false">Log in using Facebook</fb:login-button> <script> function goLogIn(){ window.location = "/fb/login_check"; } function onFbInit() {. if (typeof(FB)!= 'undefined' && FB!= null ) { FB.Event.subscribe('auth.statusChange', function(response) { setTimeout(goLogIn, 500); }); } } </script>
This works fine on all desktop browsers and iPads, but on Mobile Safari on the iPhone / iPod, the login button opens a new tab, but does not return it to the page, and so the callback is not called. When I click on the Facebook login button on my login (or registration) page, it opens the Facebook login page in a new tab, I enter my Facebook login information and the Facebook tab closes, but the focus does not return to my login page into the system, I donβt have a Mac to use the inspector, but a friend says that they received this error in the debug console "Unable to send a message to https://m.facebook.com/ The recipient has the beginning https://www.facebook.com / "
To reproduce the steps:
- Go to http://eventstagr.am/register on iPhone (Safari Mobile and Chrome both don't work)
Click Registrar
- EXPECTED : Facebook tab should close and call javascript callback function on registration page
- ACTUAL : Facebook tab closes and focus does not return to registration page
Alternatively, if you already have an account, repeat the steps above, but from http://eventstagr.am/login , the results will be the same.
source share