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

How to integrate social media in Bubble

Integrating social media in Bubble lets you display feeds, enable sharing, and post content to platforms like Instagram, Twitter, and Facebook. This tutorial covers embedding social feeds using HTML elements, connecting to social APIs via the API Connector, posting to social platforms from Bubble workflows, and pulling analytics data from social accounts.

What you'll learn

  • How to embed social media feeds in your Bubble app
  • How to connect to social platform APIs via the API Connector
  • How to post content to social media from Bubble workflows
  • How to pull social media analytics into your app
Book a free consultation
4.9Clutch rating
600+Happy partners
17+Countries served
190+Team members
Beginner6 min read20-25 minAll Bubble plansMarch 2026RapidDev Engineering Team
TL;DR

Integrating social media in Bubble lets you display feeds, enable sharing, and post content to platforms like Instagram, Twitter, and Facebook. This tutorial covers embedding social feeds using HTML elements, connecting to social APIs via the API Connector, posting to social platforms from Bubble workflows, and pulling analytics data from social accounts.

Overview: Social Media Integration in Bubble

This tutorial shows you how to connect your Bubble app to major social media platforms. Whether you want to display an Instagram feed, let users share content to Twitter, or post automatically to Facebook, you will learn to use HTML embed elements for quick widgets and the API Connector for deeper integrations.

Prerequisites

  • A Bubble app on any plan
  • Developer accounts on the social platforms you want to integrate (Meta Developer, Twitter Developer, etc.)
  • API keys or access tokens for each platform
  • Basic understanding of the API Connector plugin in Bubble

Step-by-step guide

1

Embed a social media feed using an HTML element

The quickest way to display social content is embedding a widget. Drag an HTML element onto your page from the Element Palette. For an Instagram feed, use a service like Elfsight or SnapWidget that provides an embed code — paste the embed code into the HTML element. For a Twitter/X timeline, go to publish.twitter.com, enter your profile URL, select Embedded Timeline, and copy the generated HTML code into the Bubble HTML element. Resize the HTML element to fit your page layout. This method requires no API configuration.

Pro tip: Embed widgets load externally and can slow your page. Place them below the fold or inside a group that loads only when scrolled into view.

Expected result: A live social media feed displays within your Bubble page, updating automatically with new posts.

2

Set up the API Connector for a social platform

Go to Plugins → Add plugins → search for API Connector and install it (it may already be installed). Open the API Connector configuration. Click Add another API. Name it (e.g., Twitter API). Set the Authentication type to OAuth2 User-Agent Flow for platforms that require user login, or Private key in header for app-level access. Enter the API base URL. For Twitter API v2, the base URL is https://api.twitter.com/2. Add your Bearer Token as a shared header: key = Authorization, value = Bearer [your_token]. Check the Private checkbox on the token to keep it server-side.

Expected result: The API Connector is configured with authentication for your chosen social platform.

3

Create an API call to fetch social media data

In the API Connector, click Add another call under your social API. Name it (e.g., Get User Tweets). Set the method to GET. Enter the endpoint URL — for Twitter: /users/[user_id]/tweets?max_results=10&tweet.fields=created_at,public_metrics. Set Use as to Data so you can use the response in Repeating Groups. Click Initialize call to test it. Bubble will map the JSON response fields automatically. You can now use Get data from an external API → Twitter API - Get User Tweets in any Repeating Group data source.

Expected result: The API call returns social media data that you can display in a Repeating Group on your page.

4

Post to social media from a Bubble workflow

To post content from your app to a social platform, create a new API call in the API Connector set to POST method with Use as set to Action. For Twitter, the endpoint is /tweets with a JSON body containing the text parameter. In your Bubble workflow (e.g., When Button Post is clicked), add a Plugins action → Twitter API - Create Tweet. Map the content parameter to the text input's value on your page. This lets users or automated workflows publish content directly to social platforms.

Twitter API - Create Tweet body (JSON)
1{
2 "text": "<content_parameter>"
3}

Expected result: Triggering the workflow publishes a new post to the configured social media account.

5

Display social analytics in your app

Create another API call to fetch analytics data — for example, Twitter public_metrics (likes, retweets, impressions) or Instagram insights. Set Use as to Data. Initialize the call and map the response. On your analytics page, add Text elements bound to the API data source. For example, display the like count from the API response. To track metrics over time, create a backend workflow that runs on a schedule (e.g., daily), fetches the latest metrics via the API call, and saves them to a Metrics Data Type with fields for date, likes, followers, and impressions.

Expected result: Your app displays social media metrics and optionally tracks them over time in your database.

Complete working example

API Connector payload
1{
2 "API Name": "Twitter API v2",
3 "Authentication": "Private key in header",
4 "Shared Headers": {
5 "Authorization": "Bearer [your_bearer_token] (Private)"
6 },
7 "Calls": [
8 {
9 "Name": "Get User Tweets",
10 "Method": "GET",
11 "URL": "https://api.twitter.com/2/users/[user_id]/tweets?max_results=10&tweet.fields=created_at,public_metrics",
12 "Use as": "Data"
13 },
14 {
15 "Name": "Create Tweet",
16 "Method": "POST",
17 "URL": "https://api.twitter.com/2/tweets",
18 "Use as": "Action",
19 "Body": {
20 "text": "<content_parameter>"
21 }
22 },
23 {
24 "Name": "Get Tweet Metrics",
25 "Method": "GET",
26 "URL": "https://api.twitter.com/2/tweets/[tweet_id]?tweet.fields=public_metrics",
27 "Use as": "Data"
28 }
29 ],
30 "Data Type for Tracking": {
31 "SocialMetric": {
32 "date": "date",
33 "platform": "text",
34 "likes": "number",
35 "followers": "number",
36 "impressions": "number"
37 }
38 }
39}

Common mistakes when integrating social media in Bubble

Why it's a problem: Exposing social media API keys in client-side requests

How to avoid: Always check the Private checkbox on API key parameters in the API Connector to keep them server-side

Why it's a problem: Not handling rate limits from social media APIs

How to avoid: Cache API responses in your Bubble database and refresh on a schedule rather than making API calls on every page load

Why it's a problem: Using embed widgets for data you need to process

How to avoid: Use the API Connector to fetch data you need to process, filter, or store. Use embeds only for display-only content.

Best practices

  • Cache social media API responses in your database to reduce API calls and improve page load speed
  • Always mark API tokens as Private in the API Connector to prevent exposure
  • Use OAuth2 User-Agent Flow when users need to connect their own social accounts
  • Use backend scheduled workflows to fetch analytics data rather than loading it on every page visit
  • Handle API errors gracefully — show a fallback message if the social feed fails to load
  • Test with sandbox or development API keys before switching to production credentials

Still stuck?

Copy one of these prompts to get a personalized, step-by-step explanation.

ChatGPT Prompt

I want to integrate Twitter and Instagram into my Bubble.io app. I need to display a feed of recent tweets, let users share content to Twitter, and show basic analytics. What APIs and endpoints do I need?

Bubble Prompt

Set up an API Connector call to the Twitter API v2 that fetches the 10 most recent tweets for a user. Display them in a Repeating Group with the tweet text, date, and like count. Add a Share to Twitter button that opens a pre-filled tweet compose window.

Frequently asked questions

Can I display an Instagram feed without an API?

Yes. Use a third-party embed widget service like Elfsight or SnapWidget that generates an HTML embed code. Paste it into a Bubble HTML element. This method does not require API configuration but offers limited customization.

Do I need a developer account to integrate social media APIs?

Yes. Each platform requires a developer account and app registration to obtain API keys. Twitter requires a Developer Portal account, Meta requires a Meta for Developers account.

How do I handle social media API rate limits in Bubble?

Cache API responses in your Bubble database using a scheduled backend workflow that fetches data every 15-30 minutes. Serve cached data to users instead of making live API calls on every page load.

Can I let users connect their own social media accounts?

Yes. Use OAuth2 User-Agent Flow in the API Connector. This redirects users to the social platform to authorize your app, then stores their access token for making API calls on their behalf.

Can RapidDev help integrate social media platforms into my Bubble app?

Yes. RapidDev can set up API Connector configurations, OAuth flows, social feed displays, automated posting workflows, and analytics dashboards for any social media platform in your Bubble app.

Why is my embedded social feed loading slowly?

Embed widgets load external scripts and content, which adds to your page load time. Place them below the fold, lazy-load them inside a conditionally visible group, or switch to the API Connector for faster native data display.

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.