LoginButton Component
The easiest way to add Facebook login is using theLoginButton component, which renders a styled button that handles the entire login flow.
Basic Usage
Getting the Access Token
After a successful login, retrieve the access token:LoginManager API
For custom UI or more control over the login flow, use theLoginManager API.
Requesting Permissions
Requesting Additional Permissions
Logging Out
Limited Login (iOS)
Limited Login is required for iOS if using React Native FBSDK Next >= 13.0.0. It allows users who have opted out of App Tracking Transparency to still use Facebook login.
LoginButton with Limited Login
LoginManager with Limited Login
Login Configuration
Setting Login Behavior (Android)
- Native with Fallback
- Native Only
- Web Only
Setting Default Audience
Control who can see posts made by your app:Re-authorizing Data Access
Request updated permissions from users:Common Login Flows
- Basic Login
- Login with Profile
Available Permissions
Common permissions you can request:public_profile- Basic profile information (default)email- User’s email addressuser_friends- List of user’s friends who also use your appuser_birthday- User’s birthdayuser_location- User’s locationuser_hometown- User’s hometown
Some permissions require your app to be reviewed by Facebook before they can be used in production.