Skip to main content

Facebook Pages

This page contains the setup guide and reference information for the Facebook Pages source connector.

Prerequisites

To set up the Facebook Pages source connector, you need a Facebook app, a long-lived Page access token, and the ID of the Page you want to sync.

note

This connector calls v24.0 of the Facebook Graph API.

Meta only returns Page Insights data for Pages with 100 or more likes, and the connector checks the connection by reading the page_insights stream. If your Page has fewer than 100 likes, expect the connection check and both insights streams to return no data or fail.

Setup guide

Step 1: Set up Facebook Pages

  1. Create a Facebook Developer Account. Follow these instructions to create one.
  2. Create a Facebook App. Choose "Company" as the purpose of the app. Fill out the remaining fields to create your app, then follow along the "Connect a User Page" section.
  3. Connect a User Page using the Graph API Explorer. Choose your app in the Meta App field. Choose your Page in the User or Page field. Add the following permissions:
    • pages_read_engagement
    • pages_read_user_content
    • pages_show_list
    • read_insights
  4. Click Generate Access Token and follow instructions.

After all the steps, it should look something like this:

  1. Generate Long-Lived User Access Token.
  2. Generate Long-Lived Page Token.

Step 2: Set up the Facebook Pages connector in Airbyte

  1. In the left navigation bar, click Sources. In the top-right corner, click + New source.
  2. Select Facebook Pages and enter a name for the source.
  3. For Page Access Token, enter the long-lived Page token you generated in Step 1. The connector also accepts a long-lived User token, as long as that user can generate a Page token for the Page you configure.
  4. For Page ID, enter the Page's ID or username. If your Page URL is https://www.facebook.com/Test-1111111111, use Test-1111111111.
  5. (Optional) Set Page Size to control the number of records requested per API call for the post and post_insights streams. The default is 100, and valid values are 1 through 100. Decrease it if you see "Please reduce the amount of data you're asking for" errors.

Creating your own OAuth App

Follow this Facebook documentation to create an OAuth App.

Required permissions for your OAuth App to sync data using the Facebook Pages source connector:

  • pages_read_engagement
  • pages_read_user_content
  • pages_show_list
  • read_insights

If you encounter permission errors for specific Page fields, see Meta's Permissions Reference for additional permissions you might need. As a rule it's best to request the lowest number of permissions you can to function normally.

Supported sync modes

The Facebook Pages source connector supports the following sync modes:

Supported Streams

StreamGraph API endpointNotes
page/{page-id}One record describing the Page. Airbyte requests only the fields you select in the connection's Schema tab.
post/{page-id}/feedOne record per post. Paginated, so Page Size applies. Airbyte requests only the fields you select.
page_insights/{page-id}/insightsOne record per metric and period, not per day. Requests a fixed set of metrics.
post_insights/{page-id}/feed with an insights.metric(...) field selectionPost-level insights, one record per metric and period. Paginated, so Page Size applies. Requests a fixed set of metrics.

You can't choose which insights metrics to sync. The connector requests these:

  • page_insights: page_total_actions, page_post_engagements, page_fan_adds_by_paid_non_paid_unique, page_media_view, page_total_media_view_unique
  • post_insights: post_media_view, post_total_media_view_unique, post_clicks, post_clicks_by_type, post_reactions_by_type_total

Both insights streams inherit Meta's own limits on Page Insights: data is available only for Pages with 100 or more likes, most metrics refresh once every 24 hours, and Meta retains at most two years of history.

Reference

This connector uses the Meta Graph API with the https://graph.facebook.com/v24.0 endpoint. Airbyte requests the selected Page and Post fields from the connector catalog, and requests a fixed set of Page Insights and Post Insights metrics.

For programmatic configuration, use these parameter names:

FieldRequiredDescription
access_tokenYesLong-lived Page access token for the Facebook Page. The connector also accepts a long-lived User access token that can generate a Page access token for the configured Page.
page_idYesFacebook Page ID.
page_sizeNoNumber of records to request per page for the post and post_insights streams. Defaults to 100. Valid values are 1 through 100.

Limitations & Troubleshooting

"This application has not been approved to use this API" error

This error means Meta rejected the API request because the app that generated the token isn't approved for the requested API, permission, or Page field.

To resolve this error, use a token from an app that has access to the permissions required by the streams you sync:

  • pages_read_engagement
  • pages_read_user_content
  • pages_show_list
  • read_insights

If you use your own Meta app, it might need App Review and Advanced Access before it can use these permissions in production. The person who generates the token must also be able to perform the required task on the Page. For Page Insights, Meta requires access to a Page that you own or administer, or on which you can perform the ANALYZE task.

"Please reduce the amount of data you're asking for" error

This error occurs when the Facebook Graph API considers the total response data too large. Starting from version 2.1.3, the connector treats it as a configuration error and fails the sync instead of retrying, because retrying the same request never succeeds. There are two ways to resolve it:

  • Remove fields from the request via the Schema Tab. Go to your connection's Schema Tab and deselect fields you don't need for the affected stream. This reduces the number of fields included in API requests. Supported streams: page, post.
  • Reduce page size. Set the Page Size configuration parameter to a lower value (e.g., 25 or 50). This reduces the number of records fetched per API request. Supported streams: post, post_insights.

"Facebook API request contains invalid Page fields, metrics, or permissions" error

Starting from version 2.1.3, the connector fails a sync with this configuration error when the Graph API rejects a request with HTTP 400 for a reason it can't retry, and includes Facebook's own error message so you can see what was rejected. Earlier versions retried these requests several times before failing, which hid the message from Facebook.

To resolve it, read the Facebook message that follows the error. It usually names a Page or Post field your token isn't allowed to read, or a field Meta no longer supports. Deselect that field in the connection's Schema tab, or use a token with the required permissions.

Reach metrics missing from Page Insights and Post Insights

Meta retired the page_impressions_*_unique and post_impressions_*_unique metrics. Because the Graph API rejects an entire Insights request when any single requested metric is invalid, requesting them returned (#100) The value must be a valid insights metric and broke both insights streams — and, since the connection check queries page_insights, source setup as well. See Meta's deprecated metrics list.

Starting from version 2.1.2 the connector no longer requests them. Only total reach has a replacement; the paid, viral, non-viral, fan and organic reach breakdowns were retired with no equivalent and are permanently unavailable from the API.

StreamNo longer emittedReplacement
page_insightspage_impressions_uniquepage_total_media_view_unique
page_insightspage_impressions_paid_unique, page_impressions_viral_unique, page_impressions_nonviral_uniquenone
post_insightspost_impressions_uniquepost_total_media_view_unique
post_insightspost_impressions_paid_unique, post_impressions_fan_unique, post_impressions_organic_unique, post_impressions_viral_unique, post_impressions_nonviral_uniquenone

The stream schemas are unchanged, so no schema refresh is needed. Rows for the removed metrics simply stop arriving; clear the affected streams if you prefer a consistent history in your destination.

Product catalogs field not available

Starting from version 2.0.4, the product_catalogs field is no longer synced in the Page stream and will always be null. This is because the Facebook Graph API only returns product catalogs that are owned directly by the Page, not catalogs owned by a Business. Since most product catalogs are now created as Business-owned catalogs (Page-owned catalogs are a legacy feature), and this connector uses Page access tokens, the product_catalogs field would not return meaningful data for most users.

Data type map

Integration TypeAirbyte TypeNotes
stringstring
numbernumber
arrayarray
objectobject

Performance considerations

Facebook heavily throttles API tokens generated from Facebook Apps by default, making it infeasible to use such a token for syncs with Airbyte. To be able to use this connector without your syncs taking days due to rate limiting, follow the instructions in the Setup Guide above to generate a Long-Lived Page Token.

The Graph API can report rate limits with HTTP 400 and an error code such as 4, 17, 32, 613, or 80001. Starting from version 2.1.3, the connector recognizes these codes, and any error Meta marks as transient, and retries the request with backoff instead of failing immediately. Retries are limited, so if your Page stays throttled long enough to exhaust them, the sync still fails with a transient error and succeeds on a later attempt once the quota resets.

See Facebook's documentation on rate limiting for the full list of codes and for information on requesting a quota upgrade.

IP allow list

If you use Airbyte Cloud and your organization restricts access to specific IPs, add the Airbyte Cloud IP addresses to your allow list.

Reference

Config fields reference

Field
Type
Property name
string
access_token
string
page_id
integer
page_size

Changelog

Expand to review
VersionDatePull RequestSubject
2.1.32026-09-0878077Fail fast on deterministic Facebook API bad request errors as config errors, surface the Facebook error message, and keep retrying rate-limit and transient errors.
2.1.22026-08-1784408Remove Page/Post Insights metrics deprecated by Meta and request page_total_media_view_unique / post_total_media_view_unique instead; fail fast with Meta's own message on invalid-metric errors.
2.1.12026-05-2278342Classify Facebook app-approval errors as configuration errors.
2.1.02026-03-0272949Use QueryProperties with JsonSchemaPropertySelector to limit API field requests to user-selected fields; add configurable page_size for post and post_insights streams
2.0.42026-01-2972253Remove product_catalogs from fields request parameter
2.0.32025-12-0170248Use correct pagination parameter name (limit instead of page_size)
2.0.22025-12-0170258Use Post stream for check, handle 400 error in Page stream
2.0.12025-11-2770242Refresh in-app documentation to reflect v24 API version
2.0.02025-11-1969714Upgrade Facebook API to v24.0
1.1.42025-08-1464141Upgrade Facebook API to v23.0
1.1.32025-07-1260391Update dependencies
1.1.22025-05-1060043Update dependencies
1.1.12025-05-0353787Update dependencies
1.1.02025-04-3059126Re-enable in cloud and update versions
1.0.322025-02-0152793Update dependencies
1.0.312025-01-2752122Upgrade Facebook API to v21.0
1.0.302025-01-2552373Update dependencies
1.0.292025-01-1851637Update dependencies
1.0.282025-01-1151056Update dependencies
1.0.272025-01-0450923Update dependencies
1.0.262024-12-2850530Update dependencies
1.0.252024-12-2149997Update dependencies
1.0.242024-12-1449154Starting with this version, the Docker image is now rootless. Please note that this and future versions will not be compatible with Airbyte versions earlier than 0.64
1.0.232024-10-2947737Update dependencies
1.0.222024-10-2147025Update dependencies
1.0.212024-10-1246807Update dependencies
1.0.202024-10-0546461Update dependencies
1.0.192024-09-2846133Update dependencies
1.0.182024-09-2145734Update dependencies
1.0.172024-09-1445563Update dependencies
1.0.162024-09-0745311Update dependencies
1.0.152024-08-3145052Update dependencies
1.0.142024-08-2444664Update dependencies
1.0.132024-08-1744234Update dependencies
1.0.122024-08-1243729Update dependencies
1.0.112024-08-1043477Update dependencies
1.0.102024-08-0343224Update dependencies
1.0.92024-07-2742787Update dependencies
1.0.82024-07-2042255Update dependencies
1.0.72024-07-1341685Update dependencies
1.0.62024-07-1041543Update dependencies
1.0.52024-07-0941126Update dependencies
1.0.42024-07-0640812Update dependencies
1.0.32024-06-2540500Update dependencies
1.0.22024-06-2240058Update dependencies
1.0.12024-06-0639243[autopull] Upgrade base image to v1.2.2
1.0.02024-03-1436015Upgrade Facebook API to v19.0
0.3.02023-06-2627728License Update: Elv2
0.2.52023-04-1326939Add advancedAuth to the connector spec
0.2.42023-04-1325143Update insight metrics request params
0.2.32023-02-2323395Parse datetime to rfc3339
0.2.22023-02-1022804Retry 500 errors
0.2.12022-12-2920925Fix tests; modify expected records
0.2.02022-11-2419788Migrate lo low-code; Beta certification; Upgrade Facebook API to v.15
0.1.62021-12-229032Remove deprecated field live_encoders from Page stream
0.1.52021-11-268267updated all empty objects in schemas for Page and Post streams
0.1.42021-11-26Remove unsupported insights_export field from Pages request
0.1.32021-10-287440Generate Page token from config access token
0.1.22021-10-187128Upgrade Facebook API to v.12
0.1.12021-09-306438Annotate Oauth2 flow initialization parameters in connector specification
0.1.02021-09-015158Initial Release