FB.getLoginStatus allows you to determine if a user is logged in and connected to your app. http://developers.facebook.com/docs/reference/javascript/FB.getLoginStatus/ I wanted to use it can anyone please give me the complete code for this: If User is logged in and connected to app then output: Logged in and Connected If User is logged in but not connected to app then output: Logged in Not Connected If User is not logged in then output: Not Logged in ?? Please Help Someone, I need to use this function on my HTML Site. Please
Maybe this is something for you: FB.getLoginStatus(function(response) { if (response.status === 'connected') { // the user is logged in and has authenticated your // app document.write("Logged in and connected"); } else if (response.status === 'not_authorized') { // the user is logged in to Facebook, // but has not authenticated your app document.write("Logged in Not connected"); } else { // the user isn't logged in to Facebook. document.write("Not Logged in"); } }); Code (markup):