I have a problem that is making me sleepy. I've tried everything to solve and nothing works. My application works as follows:
- The user connects to our WiFi network and is redirected to a page external where you login with facebook using sdk with php;
-
Login occurs as expected in php showing login pages and everything else. After login Facebook redirects the page to the fbHelper = fbObje-> getRedirectLoginHelper () where I get as parameters generated by facebook before creating the facebook object:
$this->fbObj = new Facebook\Facebook(Array( 'app_id' => $this->app_id, 'app_secret' => $this->app_secret, 'default_graph_version' => $this->app_version )); $this->fbHelper = $this->fbObj->getRedirectLoginHelper();
-
In this redirect I call the javascript sdk to fetch the user data and generate the registration, and to my surprise, devices with older operating systems (ios, windows Phone, and Android) when I drag the FB.getLoginStatus () function, the The answer is that the user is connected, (android 7.0+ or iOS 9.0+) the user appears disconnected. I am several days with this problem, if someone has a light by please help me.
window.fbAsyncInit = function() { FB.init({ appId : '00XXX811XXX0000', status : true, cookie : true, xfbml : true, version : 'v2.12' }); FB.Event.subscribe('auth.statusChange', statusLogin); statusLogin(); }; (function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = 'https://connect.facebook.net/pt_BR/sdk.js#xfbml=1&version=v2.12&autoLogAppEvents=1'; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));
This is the javascript code on the platform.