1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to Track if a visitor is logged in FB or not

Discussion in 'FaceBook' started by XTR3M3 XPL01T3R, Nov 9, 2016.

  1. XTR3M3 XPL01T3R

    XTR3M3 XPL01T3R Power Member

    Joined:
    Sep 19, 2009
    Messages:
    797
    Likes Received:
    99
    Hi,

    I have a website which is being flooded with facebook and other sources traffic. Is there any code to identify if the visitor is logged into fb or not ?

    Thanks!
     
  2. indianbill007

    indianbill007 Jr. VIP Jr. VIP

    Joined:
    Jan 8, 2010
    Messages:
    5,073
    Likes Received:
    4,041
    Occupation:
    Making Money when the world is sleeping
    Location:
    Menlo Park - Next to Zuck
  3. guddu41192

    guddu41192 Newbie

    Joined:
    Nov 9, 2016
    Messages:
    6
    Likes Received:
    0
    Gender:
    Male
    Seems usefull
     
  4. staypositive

    staypositive Power Member

    Joined:
    Jul 28, 2015
    Messages:
    612
    Likes Received:
    65
    Occupation:
    Hiring content writer, please PM
    use UserPro wordpress plugin bro.

    free version got this function too
     
  5. guddu41192

    guddu41192 Newbie

    Joined:
    Nov 9, 2016
    Messages:
    6
    Likes Received:
    0
    Gender:
    Male
    Kk. . . Thanks. . . :)
     
  6. XTR3M3 XPL01T3R

    XTR3M3 XPL01T3R Power Member

    Joined:
    Sep 19, 2009
    Messages:
    797
    Likes Received:
    99
  7. XTR3M3 XPL01T3R

    XTR3M3 XPL01T3R Power Member

    Joined:
    Sep 19, 2009
    Messages:
    797
    Likes Received:
    99
    Thank you.

    But i'm not using wordpress. Is there any work around ?
     
  8. indianbill007

    indianbill007 Jr. VIP Jr. VIP

    Joined:
    Jan 8, 2010
    Messages:
    5,073
    Likes Received:
    4,041
    Occupation:
    Making Money when the world is sleeping
    Location:
    Menlo Park - Next to Zuck
    Yes create an app and you need to use the app id, that's all.
     
    • Thanks Thanks x 1
  9. ankit03

    ankit03 Jr. VIP Jr. VIP

    Joined:
    Apr 3, 2016
    Messages:
    1,286
    Likes Received:
    115
    No i think only facebook know who is logged in or out
     
  10. gretiwersi

    gretiwersi Junior Member

    Joined:
    Aug 3, 2015
    Messages:
    125
    Likes Received:
    35
    Place this script in head tags of the site.

    Code:
     <script type="text/javascript">
       function show_login_status(status)
       {
        if (status)
        {
         alert("Logged in to facebook");
        }else{
         alert("Not logged in to facebook");
        }
       }
     </script>
     
    And place this script somewhere in the site body. (Replace xxxxxxxx with your fb app I'd.)

    Code:
    <script>
     window.fbAsyncInit = function(){
      FB.init({ appId:'xxxxxxxxxxxx', status:true,  cookie:true, xfbml:true});
      FB.getLoginStatus(function(response){
       if (response.status != "unknown")
       {
        show_login_status("Facebook", true);
       }else{
        show_login_status("Facebook", false);
       }
      });
     };
     // Load the SDK Asynchronously
     (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));
    </script>
    
     
    • Thanks Thanks x 1