Getting Started - Facebook Public Data Connector

This guide covers the basic functionality of the Supermetrics Facebook Public Data connector for Sheets and Data Studio, and gives examples of how to set up a query in both products.

Quick links to the sections below:


The Facebook Public Data connector does not work like the other Facebook connectors in that you do not need to log in! It allows you to then collect publicly available data about pages and page posts, though the data and fields available are much more limited than having permissions to the page to use Facebook Insights directly. It uses a query selection system for the type of data you would like to collect, which limits which metrics can be used, but prevents user errors from combining invalid field combinations.

Query Types

The Facebook Public Data connector supports 3 type of queries:

  • Facebook page data - gathers data about the page itself, like Likes, About, Website Link, etc.
  • Facebook posts by a page - gathers data about posts made to the page, such as Post Link, Reaction counts, Comment counts, etc.
  • Facebook shares for URLs - gathers data about specific URLs shared, such as URL, Share count, Comment count, etc.

Query type selection in Google Sheets:

Query type selection in Data Studio:

Example Query Setup in Google Sheets

Here is a walk-through for setting up a 'Facebook posts by a page' query using the Google Sheets Add-on. (The example for Data Studio is below this section.)

  1. With an empty cell selected, launch the sidebar in Google Sheets.
  2. In the Data Source section, select the connector "Facebook Public Data"
  3. This connector does not require you to log on. It should immediately open the Query Type section.
  4. In the Select query type drop-down, select "Facebook posts by a page".
  5. In the Facebook page alias/ID box, add the page name you wish to search for. You can add expand the box and add more than one name, one each on a new line.
  6. In the # of rows per item drop-down, select "10". This will pull the most first 10 items for the page name you added. For better performance, avoid higher row values. (Note that the connector will fetch no more than 600 rows, so any row count higher than 500 will be set to 600.)
  7. Open the Select dates section. This will be used to determine which posts are fetched, based on their creation date. In this example, it is set to "This month to yesterday".
  8. Open the Select metrics section. Click and select the metrics you want to use from the drop-down menu. Note that as this is a public connector, it's field options are more limited than the full Facebook Insights connector.

  9. Open the Split by section. Click and select dimension you wish the split by, such as the Post ID or the link to the specific post.

  10. You can also apply filters to some fields under Filter, or set "no headers" in the advanced settings under the Options. These are optional though, and not required to make the query work.
  11. At the top of the sidebar, click Get Data to Table to run the query and see the results. In this example, this is the most recent 10 posts made to the Supermetrics page.

  12. If further adjustments need to be made, click Modify. Note that due to the nature of the "Query type" system, you cannot combine page data with post data in a single query. If you get errors, see the "Common Issues" section in this article at the bottom.

Example Query Setup in Data Studio

Here is a walk-through for setting up a 'Facebook posts by a page' query using the Data Studio connector.

  1. In Data Studio, add a new data source and search for "Facebook Public Data" in the Partner Connectors section. Click SELECTto add it.

  2. Click AUTHORIZE to start the authorization process for Data Studio. In the resulting pop-up, click your Google account you are using for Data Studio access. Click Allow to continue (else the connector won't function).
  3. Click AUTHORIZEfor Facebook Public Data. You do not need to log in to use this connector, it will open a pop-up that closes automatically, and then should  go to the next part of the configuration.

    Facebook public data connector authorization process

  4. In the Query typedrop-down,  select "Facebook posts by a page".

    Query type drop-down with Facebook posts by a page already selected

  5. Go down to the ***************** SETTINGS FOR QUERY TYPE: Facebook posts by a page ***************** section.
  6. In the Facebook page aliases/IDs box, add one or more page names, comma separated.
  7. In the # of posts per pagedrop-down, select "10". This will pull the most recent 10 items for each page name you added. Data Studio is hard-coded to a 250 row maximum by design. For better performance, avoid higher row values. 

    Facebook posts by a page example query setup for 10 rows of Supermetrics posts

  8. You do not need to fill out any other query section as it will not be used. Note that you can only set one query type at a time with this connector. If you need other query types, repeat this process to create a new data source with the different query type selected.
  9. Give the Data Source a meaningful name.

    Blue arrow pointing to name box for the data source in Data Studio

  10. Click CONNECT in the upper right-hand corner to create the data source.
  11. It will take you to a page with all the connector's fields that are available for the "Facebook posts by a page" query type. Click ADD TO REPORT to continue.
  12. Create a report element on the report page, selecting your new source as the Data Source. Add the metrics and dimensions available to create your query. In this example, a table is used to show the last 10 posts made to the Supermetrics page.

    Example output and query configuration in Data Studio

  13. If you need to modify the query, you can do so from the Data bar in the Data Studio UI and it will update automatically to reflect your changes.

Common Issues

"No account objects selected" Errors

More often affects Data Studio. Check that you filled out the proper query section and that there's a valid page name given.

Example showing Facebook posts by page query section is empty

Query Runs Very Slowly

More commonly affects Sheets, as it allows for a larger row limit. The API being used is not that efficient, so the more pages you try pull or the more rows, the slower it gets. It may even drop some pages or give back incomplete data if request is too large. Try reducing the number of rows to something below 300 or limit the number of pages listed.

Query Missing Results

Currently the connector fetches a maximum of 600 rows of post data. If you set the row limit higher than this, the query will always be for 600 rows. This is due to the post feed limitation in the graph API: The API will return approximately 600 ranked, published posts per year.

Data may also go missing if you have too many pages selected and a high row count. The request quotas for public data connections are lower than private/authenticated ones, so trying to request too much at once can result in incomplete data being returned. To avoid this, reduce the row limit and the number of pages being fetched. Note that you may need multiple queries to get all the data, or if you have rights to the pages, use Facebook Insights connector instead.

No Data over Time is Available/I Can't Report Over Time?

Sadly, this version of the API only shows lifetime totals for most metrics and you won't be able to report changes over time unless you use the "Combine new with old" feature in Sheets and run this every day to collect your own historical data (this feature is not available at all in Data Studio). If you need time breaks-downs, consider using the Facebook Insights connector instead.

There is now a feature for specifying the dates for when you want to fetch posts - this doesn't change that the metrics are lifetime totals, but you should have more control over when you get post data.

Page Name is Correct, but Still Getting 'No Data'

See this guide for more information on this issue: Page Name is Correct but Still Getting 'No Data'

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.