This repository contains middleware that extracts data from the Facebook Ad Library and inserts it into BigQuery.
This is a contracted project I worked on for Saguaro Strategies.
A valid Google Cloud service account key file is needed. Set the following environment variable to the path of the key file before running:
export GOOGLE_APPLICATION_CREDENTIALS=[path to JSON key file]
See more at Authenticating as a Service Account.
The credentials for the Facebook project must also be provided. Create a JSON file at the root of the repository called fb-credentials.json
and store the following information:
{
"app_id": "[the app id]",
"app_secret": "[the app secret]",
"access_token": "[a valid access token]"
}
The access token in this file will periodically be exchanged for a long-lived (60 day) access token.