1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Help Needed with "FB.getLoginStatus"

Discussion in 'Facebook API' started by Rajnish357, Jan 27, 2012.

  1. #1
    FB.getLoginStatus allows you to determine if a user is logged in and connected to your app.

    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
    Rajnish357, Jan 27, 2012 IP
  2. DogDice

    DogDice Peon

    Likes Received:
    Best Answers:
    Trophy Points:
    Maybe this is something for you:

    Code (Text):
    2. FB.getLoginStatus(function(response)
    3. {
    4.   if (response.status === 'connected')
    5.   {
    6.     // the user is logged in and has authenticated your
    7.     // app
    8.     document.write("Logged in and connected");
    9.   } else if (response.status === 'not_authorized') {
    10.     // the user is logged in to Facebook,
    11.     // but has not authenticated your app
    12.     document.write("Logged in Not connected");
    13.   } else {
    14.     // the user isn't logged in to Facebook.
    15.     document.write("Not Logged in");
    16.   }
    17.  });
    DogDice, Jun 18, 2012 IP