PinoyTech.org

CodeIgniter, Kohana, Mootools, jQuery and CSS

Check if user is logged in to Facebook

Posted by teejay on April 24, 2012

I've recently had to check if a user is logged in to facebook. Fortunately, it was easy as cake.


FB.getLoginStatus(function(response) {
  if (response.status === 'connected' && or response.status === 'not_authorized') {
    // user is logged in to facebook
  } else {
    // the user isn't logged in to Facebook.
  }
 });

Categories: How To

Tags: facebook

No Comments

Comments are not allowed