Overview
Facebook Login is Meta's OAuth-based authentication service that allows users to sign in to third-party websites and applications using their Facebook account credentials. It simplifies registration and login flows by leveraging the user's existing Facebook identity. While it serves a clear functional purpose (authentication), it loads Meta's JavaScript SDK and establishes a data connection between your website and Meta's platform that extends beyond the authentication transaction itself.
What This Script Does
Facebook Login is implemented by loading Meta's JavaScript SDK from connect.facebook.net/en_US/sdk.js and invoking the FB.login() method when the user clicks a "Log in with Facebook" button.
Authentication Flow
When a user clicks the Facebook Login button:
- The SDK opens a Facebook OAuth dialog (either a pop-up window or redirect to
www.facebook.com/dialog/oauth) - The user authenticates with Facebook and reviews the permissions your application is requesting (email, public profile, etc.)
- Facebook returns an authorization code or access token to your application
- Your server-side code exchanges this for user profile data (name, email, profile picture, Facebook user ID) through Meta's Graph API
Script and Cookie Behavior
Unlike the Like Button or Share Button, the Login SDK is typically loaded on specific pages (login, registration) rather than site-wide. However, when loaded:
- The
sdk.jsscript connects toconnect.facebook.netand initializes with your Facebook App ID - The SDK checks for existing Facebook session state by reading
.facebook.comcookies (c_user,xs,datr,fr) - If the user is already logged into Facebook, the SDK can detect this and enable "auto-login" or show a personalized login prompt with the user's name and profile picture
- The
_fbpcookie may be set on the host domain if Meta Pixel integration is active fbsr_[app_id]— a signed request cookie set on your domain containing the user's Facebook session information after successful authentication. Used to maintain the Facebook login state across page loads.
Data Exchange
During the login flow, Meta receives:
- Your application's App ID and the permissions requested
- The page URL where login was initiated
- The visitor's IP address and browser metadata
- Confirmation that the user authorized your application
Your application receives (based on requested permissions):
- The user's Facebook user ID, name, email address, and profile picture
- Optionally: friends list, birthday, location, and other profile data depending on approved permissions
Consent & Compliance
Facebook Login is classified as functional. It serves a clear purpose: authenticating users. However, the consent analysis requires nuance because the SDK's loading behavior and Meta's data processing extend beyond pure authentication.
Under GDPR, the login itself typically relies on the "performance of a contract" or "consent" lawful basis — the user is explicitly choosing to authenticate via Facebook. However, loading the SDK before the user clicks the login button may trigger ePrivacy concerns if it sets cookies or transmits data during initialization. The recommended approach is to defer loading sdk.js until the user clicks the login button, ensuring no data is transmitted to Meta before the user initiates the authentication flow.
The data Meta receives through Facebook Login is also subject to Meta's own data processing policies. Users should be informed that logging in with Facebook shares data with Meta beyond what is necessary for authentication on your site.
Under CCPA/CPRA, the personal information exchanged during Facebook Login must be disclosed in your privacy policy. The user's decision to use Facebook Login constitutes an affirmative action, but they should understand what data is shared.
Should You Block This Without Consent?
Conditional. Facebook Login serves a legitimate functional purpose that the user explicitly initiates. The recommended approach is: do not load the connect.facebook.net/en_US/sdk.js script on page load. Instead, display the "Log in with Facebook" button as a static element, and only load the SDK when the user clicks it. This ensures no data is transmitted to Meta until the user has affirmatively chosen to authenticate via Facebook. If you load the SDK on page load (for features like auto-login detection), consent should be obtained first.
Consent Categories
Also Known As
Industries
Tracked Domains (1)
login.facebook.comFunctionalFrequently Asked Questions
Is consent required for Facebook Login?
Conditional. Facebook Login is classified as functional — users explicitly initiate the authentication. However, loading the SDK on page load (for auto-login detection) triggers ePrivacy concerns. The recommended approach is to load connect.facebook.net only when the user clicks the Login button, not on page load.
What data does Facebook Login collect?
During the OAuth flow, Meta receives your App ID, the page URL, visitor IP, and browser metadata. It reads existing facebook.com cookies (datr, fr) during SDK initialization. After login, fbsr_[app_id] is set on your domain to maintain Facebook session state. Your app receives the user's name, email, and Facebook user ID.
How does ConsentStack handle Facebook Login?
ConsentStack classifies Facebook Login as functional. It recommends deferred SDK loading — displaying a static Login button that triggers connect.facebook.net only on click. ConsentStack does not block Login pages by default but flags any configuration where the SDK loads on page load before user interaction.
Other Facebook Products
Related Vendors
Manage consent for Facebook Login
ConsentStack automatically detects and manages Facebook Login trackers so your site stays compliant with global privacy regulations.
