简体   繁体   中英

How can get login status of facebook user through facebook application?

I am developing a facebook application. In this application I want to get login status of my application users. If any user of my application leave my application without logout to my application, then how can I track that user's Login status? can I use access_token or user id of that user for getting status?

Well, if I understood you right, you can get the login status using

 FB.getLoginStatus(function(response) {
      if (response.authResponse) {
        // logged in and connected user, someone you know
      } else {
        // no user session available, someone you dont know
      }
    });

I didnt get the second part of ur question, "........If any user of my application leave my application without logout to my application, then how can I track that user's Login status?......" Whatever case, I guess the above FB Javascript SDK should give the login status b/w facebook and ur app..

https://developers.facebook.com/docs/reference/javascript/FB.getLoginStatus/

Hope that helped

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM