Facebook Pages

Facebook Pages is a Facebook account for a business, organization, or institution that allows users to advertise and track performance.

Data integration: Skyvia supports importing data from Facebook Pages, exporting Facebook Pages data to CSV files, and replicating Facebook Pages data to relational databases.

Backup: Skyvia Backup does not support Facebook Pages.

Query: Skyvia Query supports Facebook Pages.

Establishing Connection

To create a connection to Facebook Pages, sign in with Facebook.

Creating Connection

To connect to Facebook Pages, perform the following steps:

facebook-pages-connection

  1. Click Sign In with Facebook in the Connection Editor.
  2. Enter your email and password.

    facebook-ads-sign-in-form

Connector Specifics

Skyvia cannot write data to Facebook Pages, its data is read-only.

Object Peculiarities

Object Relations

All Facebook Pages object are related. Skyvia queries all the parent object records first, takes their IDs, and then queries child object records for each parent object record. This allows querying child objects without knowing their parents, but this method takes much time and consumes many API calls. It uses at least one API call for every parent object record and can be slow.

The Pages object is parent for all objects, and its child objects are parents for other objects.

  • Pages
    • PageDailyInsights
    • PostAttachments
    • Posts
      • Comments
      • PostLifetimeInsights
    • Videos
      • VideoLifetimeInsights

We recommend using filters on the parent object fields when querying data from such child objects. This reduces the number of parent object records for which child object data must be queried.

PostAttachments

The MediaImageSrc field contains a link to the attached image for image attachments. For video attachments, this field contains the autogenerated video frames.

The MediaSouce field contains links to video files.

When you query the Content field, Skyvia performs additional requests to the Facebook API to read the binary content. It affects the query performance and API calls usage.

Due to Facebook Pages API specifics, the query result doesn’t contain binary content if you query the shared attachments. The MediaSouce field may contain a link to the YouTube video. The MediaImageSrc field contains the shared video preview.

*Insights Objects

The PageDailyInsights, PostLifetimeInsights, and VideoLifetimeInsights are the metrics for the last two years. The PageDailyInsights object contains daily metrics. The PostLifetimeInsights and VideoLifetimeInsights are metrics for the last 2 years with breakdown by posts and videos correspondingly.

The Date field in the PageDailyInsights contains date (from 00:00 Pacific Time(UTC-7) of the current day till 00:00 Pacific Time(UTC-7) of the next day. You can apply filters to the Date field to select data for less than two years. The report doesn’t include data for the current date. Data for the previous date is incomplete.

Filtering Specifics

Facebook Pages API supports the following native filters:

Object Fields and Operators
Comments PageId (=), PostId (=)
PageDailyInsights PageId (=), Date (>=, >, <=, <, =)
Pages Id (=)
PostAttachments Id (=), PageId (=)
PostLifetimeInsights PageId (=), PostId (=)
Posts Id (=), PageId (=)
VideoLifetimeInsights PageId (=)
Videos PageId (=)

Use these filters to improve performance and save API calls. You can use filters with other fields or operators, which may increase API call usage.

Incremental Replication and Synchronization

Skyvia supports Replication with Incremental Updates for the Comments, PageDailyInsights, Posts, and Videos.

Replication only tracks new records for the Comments and PageDailyInsights objects.

Skyvia doesn’t support Synchronization for Facebook Pages objects.

Due to Facebook Pages API specifics, the data for the previous date in the PageDailyInsights object may be incomplete. The API updates them in 24 hours. To prevent data loss during replication, we enabled the retrospective updates with the AttributionWindow parameter set to 1.

Stored Procedures

Skyvia represents part of the supported Facebook Pages features as stored procedures. You can call a stored procedure, for example, as a text of the command in the ExecuteCommand action in a Target component of a Data Flow or in Query.

Nested Objects

Some Facebook Pages fields store complex structured data in JSON format. You can use our Nested Objects mapping feature in the Import integrations to insert or update the nested values in such fields. Select the Separate Tables for the Unwind Nested Objects option when using the new replication runtime to replicate the nested data into separate tables.

Object Field Nested Object
Pages CategoryList IdNameType
  DeliveryAndPickupOptionInfo, Emails, MessengerAdsDefaultIcebreakers, MessengerAdsDefaultQuickReplies ValueType
Posts Actions PostActionsType
  Attachments StoryAttachmentType
  MessageTags, StoryTags TagsType
  To PageFeedToType
Comments MessageTags, AttachmentDescriptionTags TagsType
Videos Format VideoFormatType
  AdBreaks, CustomLabels ValueType
  ContentTags IdType
PageDailyInsights PageFansLocale, PageFansCity, PageFansCountry KeyValueType
PostLifetimeInsights PostVideoRetentionGraph, PostVideoRetentionGraphClickedToPlay, PostVideoRetentionGraphAutoplayed, PostVideoViewTimeByAgeBucketAndGender, PostVideoViewTimeByRegionId, PostVideoViewTimeByCountryId KeyValueType
VideoLifetimeInsights TotalVideoRetentionGraph, TotalVideoRetentionGraphAutoplayed, TotalVideoRetentionGraphClickedToPlay, TotalVideoViewTimeByAgeBucketAndGender, TotalVideoViewTimeByRegionId KeyValueType
StoryAttachmentType DescriptionTags TagsType
  SubattachmentsData StorySubattachmentType

Supported Actions

Skyvia supports all the common actions for Facebook Pages.