|Data Source Type:||Web Accessible Resource|
|API Documentation:||Facebook Graph API|
|API Explorer:||Facebook's Graph API Explorer|
|Date Ranges:||Klipfolio Date Ranges|
Save time and add pre-built Klips with the Klip Gallery!Klip Gallery: Facebook
Connecting to the Facebook API
You can add Facebook data to a Klip by creating a query. This article shows you how to use Facebook as a data source and provides advanced information on customizing your query.
For step-by step instructions on retrieving Facebook Page Insights, see our blog: Using Facebook’s Graph API Explorer to retrieve Page Insights data.
|Reminder: Ensure that your access token is current. For instructions on re-authorizing your OAuth token, please see this article.|
Creating a data source using Facebook
To create a data source using Facebook data, you need to accomplish the following tasks as explained in the step - action table below:
- Craft a query using the Facebook Graph API Explorer
- Start the data source creation process
- Set up your Access Token
- Enter the query in Klipfolio
- Use Klipfolio to adjust the query for your dashboard
- Review our list of resources for creating Facebook queries.
|Step 1: Use the Facebook Graph API Explorer to craft a query.
In this section, you will work with the Facebook's Graph API Explorer to construct a URL.
|Step 2: Start the data source creation process.
|Step 3: Authenticate with Facebook.
Step 4: Enter the query in Klipfolio.
Now you'll need to bring the query you crafted with the Query Explorer into Klipfolio.
You may need to modify your query (see next step) before you create the data source and build a Klip.
Note: You will need to manually enter the first part of the query URL:
Step 5: Edit the query date ranges and save.||Many Klips that use Facebook data need a date range that is dynamic (for example, the past 30 days). In this section we're going to change the query from a fixed range to a dynamic one. Note that you will use the since and until parameters, as opposed to the start-date and end-date parameters used for other data sources (such as Google Analytics).|
If you used the sample query (see above), then the query should look something like this:
You can use Facebook's Graph API explorer to retrieve Facebook Page Insights data. To do this, insert
/insights after your profile ID. When you click submit, the query explorer window will update to show all insights data associated with your account. To limit the data you retrieve, click on the
id link to add that query parameter to your URL endpoint.For a quick explanation of how to forumlate a Facebook Page Insights query, check out our blog on this topic.
The Facebook Ads API are also supported.
|Daily Page View|
|Daily People Talking About This|
|Lifetime Likes by Gender and Age|
- REMOVE_EMOJI function
- Working with XML/JSON data sources
- Tips and Techniques: Function Examples
- How do I use Twitter as my data source?
- How do I use Google Docs as my data source?
- How do I use Google Analytics as my data source?