Adding Facebook login to your Bubble app requires creating a Facebook Developer app, installing Bubble's Facebook plugin, and configuring OAuth credentials. This tutorial covers the complete setup from Facebook Developer Console configuration to building the login button and handling the user data returned after authentication.
Overview: Adding Facebook Login to Your Bubble App
This tutorial walks through integrating Facebook OAuth login into your Bubble application. Facebook login lets your users sign in with their existing Facebook account instead of creating a new username and password. You will configure the Facebook Developer Console, set up the Bubble plugin, build the login flow, and handle the user profile data. This is perfect for consumer-facing apps where reducing signup friction is important.
Prerequisites
- A Bubble account with an app that has user authentication
- A personal Facebook account
- Access to the Facebook Developer Console (developers.facebook.com)
- Your Bubble app's domain URL for OAuth redirect configuration
Step-by-step guide
Create a Facebook Developer app
Create a Facebook Developer app
Go to developers.facebook.com and log in with your Facebook account. Click My Apps in the top navigation, then click Create App. Select Consumer as the app type and click Next. Enter your app name (e.g., MyBubbleApp Login), your contact email, and click Create App. On the app dashboard, find Facebook Login in the product list and click Set Up. Choose Web as the platform. For the Site URL, enter your Bubble app's URL (e.g., https://yourapp.bubbleapps.io). Click Save.
Pro tip: Your Facebook app starts in Development mode, which only allows login for app admins and testers. You must submit for App Review and switch to Live mode before all users can log in.
Expected result: A Facebook Developer app is created with Facebook Login configured for the web platform.
Configure OAuth redirect URLs in Facebook
Configure OAuth redirect URLs in Facebook
In the Facebook Developer Console, go to Facebook Login → Settings in the left sidebar. In the Valid OAuth Redirect URIs field, add your Bubble app's OAuth callback URL. This is typically https://yourapp.bubbleapps.io/api/1.1/oauth_redirect. If you have a custom domain, add that version too (e.g., https://yourdomain.com/api/1.1/oauth_redirect). Click Save Changes. Then go to Settings → Basic in the left sidebar and copy the App ID and App Secret — you will need these in Bubble.
Expected result: The OAuth redirect URI is configured and you have the App ID and App Secret ready.
Install and configure the Facebook plugin in Bubble
Install and configure the Facebook plugin in Bubble
In your Bubble editor, go to the Plugins tab. Click Add plugins and search for Facebook. Install the official Facebook plugin. Once installed, open its settings. Paste your App ID into the App ID field and your App Secret into the App Secret field. In the Permissions field, enter email,public_profile — these are the basic permissions that let you access the user's email and name without additional Facebook review.
Expected result: The Facebook plugin is installed with your App ID, App Secret, and requested permissions configured.
Build the Facebook login button and workflow
Build the Facebook login button and workflow
Go to the Design tab and open your login page. Add a Button element and style it to look like a Facebook login button (blue background, white text reading Continue with Facebook, and optionally add the Facebook icon). Go to the Workflow tab and create a workflow for When Button Facebook Login is clicked. Add the action Account → Signup/login with a social network. Select Facebook as the provider. After this action, add a navigation action to redirect the user to your app's main page (e.g., Go to page dashboard).
Expected result: Clicking the Facebook button triggers the OAuth popup, and after approval the user is logged in and redirected.
Access and store Facebook profile data
Access and store Facebook profile data
When a user logs in with Facebook for the first time, Bubble automatically creates a User record. The user's email from Facebook is stored in the email field. To access additional data like the user's name or profile picture, go to your User data type and add fields like facebook_name (text) and profile_image_url (text). In your login workflow, after the Signup/login action, add a Make changes to Current User action. Set facebook_name to Current User's Facebook's name and profile_image_url to Current User's Facebook's picture URL.
Pro tip: The user's Facebook profile picture URL may change over time. Consider downloading and storing the image in Bubble's file storage for reliability.
Expected result: After Facebook login, the user's name and profile picture are saved to your database for use throughout the app.
Test the Facebook login flow
Test the Facebook login flow
Open your app in Preview mode. Click the Facebook login button. A Facebook authorization popup should appear asking for permission to share your email and profile. Click Continue. After authorization, you should be redirected to your app's main page as a logged-in user. Check the Data tab → App data → User to verify a new User record was created with the Facebook email and profile data. Test with a second Facebook account by adding them as a tester in the Facebook Developer Console under App Roles.
Expected result: Facebook login works end to end — users can sign in, their data is stored, and they are redirected to the correct page.
Complete working example
1FACEBOOK LOGIN WORKFLOW SUMMARY2================================34FACEBOOK DEVELOPER CONSOLE:5 App Type: Consumer6 Products: Facebook Login (Web)7 Site URL: https://yourapp.bubbleapps.io8 Valid OAuth Redirect URI:9 https://yourapp.bubbleapps.io/api/1.1/oauth_redirect10 Permissions: email, public_profile11 Copy: App ID + App Secret1213BUBBLE PLUGIN SETUP:14 Plugin: Facebook15 App ID: [paste from Facebook]16 App Secret: [paste from Facebook]17 Permissions: email,public_profile1819DATA TYPE ADDITIONS (User):20 - facebook_name (text)21 - profile_image_url (text)22 - auth_provider (text)2324PAGE ELEMENTS:25 Login page:26 - Button: Continue with Facebook (blue, white text)27 - Optional: Facebook icon image2829WORKFLOW 1: Facebook Login30 Event: Button Facebook Login is clicked31 Action 1: Signup/login with a social network32 Provider: Facebook33 Action 2: Make changes to Current User34 facebook_name = Current User's Facebook's name35 profile_image_url = Current User's Facebook's picture URL36 auth_provider = Facebook37 Action 3: Go to page dashboard3839WORKFLOW 2: Handle Existing User40 Event: Page is loaded41 Only when: Current User is logged in42 Action: Go to page dashboard4344TESTING:45 - Facebook app must be in Development mode46 - Add test users in App Roles47 - Switch to Live mode for productionCommon mistakes when integrating login functionality with Facebook in a Bubble.io app: Step-by-S
Why it's a problem: Forgetting to add the OAuth redirect URI in Facebook settings
How to avoid: Add https://yourapp.bubbleapps.io/api/1.1/oauth_redirect to Valid OAuth Redirect URIs in Facebook Login → Settings.
Why it's a problem: Leaving the Facebook app in Development mode for production
How to avoid: Complete Facebook's App Review process and switch your app to Live mode in the Facebook Developer Console.
Why it's a problem: Requesting unnecessary permissions without Facebook review
How to avoid: Start with email,public_profile only. Request additional permissions only after completing Facebook's App Review.
Best practices
- Always start with the minimum permissions (email, public_profile) and request more only when needed
- Add both your Bubble subdomain and custom domain to the OAuth redirect URIs
- Store the user's auth provider so you can display the correct login option on return visits
- Provide an alternative email/password login option alongside Facebook for users who prefer it
- Handle the case where a user's Facebook email matches an existing account by merging accounts
- Test login with multiple Facebook accounts including ones not associated with your developer account
- Display a clear privacy notice explaining what Facebook data your app accesses
Still stuck?
Copy one of these prompts to get a personalized, step-by-step explanation.
I am building a Bubble.io app and want to add Facebook login. I need help with configuring the Facebook Developer Console, setting up the Bubble plugin, and creating the login workflow. My app URL is [your-app-url]. What are the exact steps?
Add Facebook login to my app. I need a login page with a Continue with Facebook button that authenticates the user via OAuth and stores their name and profile picture. Also redirect logged-in users to the dashboard page.
Frequently asked questions
Do I need a Facebook Business account for this?
No. A personal Facebook account is sufficient to create a Facebook Developer app. However, for production apps processing significant traffic, a verified business account is recommended.
What if a user's Facebook email already exists in my database?
Bubble's social login action automatically links the Facebook account to the existing user if the email matches. The user can then log in with either method.
Can users log in with Facebook on mobile browsers?
Yes. Facebook OAuth works on mobile browsers. The authorization flow opens in a popup or redirects to the Facebook app if installed on the user's device.
How do I get the user's Facebook friends list?
Accessing a user's friends list requires the user_friends permission, which requires Facebook App Review. Even with approval, you can only see friends who also use your app.
What happens if Facebook's API is down?
Users will not be able to log in via Facebook during outages. Always provide an alternative login method (email/password) so users are not locked out of your app.
Can RapidDev help with advanced Facebook integrations?
Yes. RapidDev can help implement advanced Facebook features like sharing to feed, messenger integrations, Facebook Pixel tracking, and custom audience syncing for advertising.
Talk to an Expert
Our team has built 600+ apps. Get personalized help with your project.
Book a free consultation