Skip to main content
RapidDev - Software Development Agency
bubble-tutorial

How to integrate login functionality with Facebook in a Bubble.io app: Step-by-S

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.

What you'll learn

  • How to create and configure a Facebook Developer app for OAuth
  • How to install and set up the Facebook login plugin in Bubble
  • How to build a login page with a Facebook sign-in button
  • How to access Facebook profile data after authentication
Book a free consultation
4.9Clutch rating
600+Happy partners
17+Countries served
190+Team members
Beginner7 min read15-20 minAll Bubble plansMarch 2026RapidDev Engineering Team
TL;DR

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

1

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.

2

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.

3

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.

4

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.

5

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.

6

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

Workflow summary
1FACEBOOK LOGIN WORKFLOW SUMMARY
2================================
3
4FACEBOOK DEVELOPER CONSOLE:
5 App Type: Consumer
6 Products: Facebook Login (Web)
7 Site URL: https://yourapp.bubbleapps.io
8 Valid OAuth Redirect URI:
9 https://yourapp.bubbleapps.io/api/1.1/oauth_redirect
10 Permissions: email, public_profile
11 Copy: App ID + App Secret
12
13BUBBLE PLUGIN SETUP:
14 Plugin: Facebook
15 App ID: [paste from Facebook]
16 App Secret: [paste from Facebook]
17 Permissions: email,public_profile
18
19DATA TYPE ADDITIONS (User):
20 - facebook_name (text)
21 - profile_image_url (text)
22 - auth_provider (text)
23
24PAGE ELEMENTS:
25 Login page:
26 - Button: Continue with Facebook (blue, white text)
27 - Optional: Facebook icon image
28
29WORKFLOW 1: Facebook Login
30 Event: Button Facebook Login is clicked
31 Action 1: Signup/login with a social network
32 Provider: Facebook
33 Action 2: Make changes to Current User
34 facebook_name = Current User's Facebook's name
35 profile_image_url = Current User's Facebook's picture URL
36 auth_provider = Facebook
37 Action 3: Go to page dashboard
38
39WORKFLOW 2: Handle Existing User
40 Event: Page is loaded
41 Only when: Current User is logged in
42 Action: Go to page dashboard
43
44TESTING:
45 - Facebook app must be in Development mode
46 - Add test users in App Roles
47 - Switch to Live mode for production

Common 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.

ChatGPT Prompt

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?

Bubble Prompt

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.

RapidDev

Talk to an Expert

Our team has built 600+ apps. Get personalized help with your project.

Book a free consultation

Need help with your project?

Our experts have built 600+ apps and can accelerate your development. Book a free consultation — no strings attached.

Book a free consultation

We put the rapid in RapidDev

Need a dedicated strategic tech and growth partner? Discover what RapidDev can do for your business! Book a call with our team to schedule a free, no-obligation consultation. We'll discuss your project and provide a custom quote at no cost.