When you visit many popular websites, they’ll check to see if you’re still signed from a previous session. If you are, they’ll skip the sign-in page and let you immediately see personalized content – your inbox, your favorite news sources, or your friends’ activity.
If you’ve integrated Facebook Login on your website, you can give returning users a similar, streamlined experience. People won’t have to see the logged-out version of your site and won’t waste time signing-in. By automatically determining if a user is signed-in to Facebook, you can let returning users immediately start engaging with your site.
response.status == ‘connected’, this indicates that the user has already authorized your website using Facebook Login, and you can retrieve their User Access Token from the ‘response’ object with
response.authResponse.accessToken. To give your users the best experience, we recommend calling FB.getLoginStatus on all your landing pages to detect users' Facebook Login state on load.
Here’s a working example:
- TripAdvisor: Logged-in Facebook users are 27% more engaged in the site and 2x more likely to contribute content than the average TripAdvisor user.
- The Huffington Post: People who are logged-in with Facebook do 22% more pageviews and spend 8 minutes longer on the site than their average reader.
Using FB.getLoginStatus is an easy way to immediately make your site more engaging and provide a better experience for returning users. Learn more about client-side authentication and FB.getLoginStatus.