Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I don't know why, but the following code works fine for me at least~ </p> <pre><code>window.fbAsyncInit = function() { FB.init({ appId : '&lt;?php echo FACEBOOK_APP_ID ?&gt;', status : true, cookie : true, xfbml : true, oauth : true, }); FB.getLoginStatus(function(response){ if (response.status === 'connected') { // the user is logged in and has authenticated your // app, and response.authResponse supplies // the user's ID, a valid access token, a signed // request, and the time the access token // and signed request each expire var uid = response.authResponse.userID; var accessToken = response.authResponse.accessToken; var signed_request = response.authResponse.signedRequest; // avoid using cookie self.location= "&lt;?php echo site_url()?&gt;/signup/fb_login/"+uid; } else if (response.status === 'not_authorized') { // the user is logged in to Facebook, // but has not authenticated your app FB.login(function(response) { if (response.authResponse) { self.location="&lt;?php echo site_url()?&gt;/signup/fb_register"; /* FB.api('/me', function(response) { */ /* }); */ } }, {scope: 'email,user_hometown'}); } else { // unknown // the user isn't logged in to Facebook. } }); FB.Event.subscribe('auth.login', function(response) { window.location.reload(); }); FB.Event.subscribe('auth.logout', function(response) { window.location.reload(); }); }; (function(d){ 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)); </code></pre> <p>`</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload