The Facebook Pages source type allows you to filter for interactions related to specific Facebook pages and their linked Instagram pages.
The interactions you receive represent different types of engagement taking place on the Facebook page(s) you want to monitor. Each interaction carries information about the type of engagement it represents and about the content that engagement is related to.
Facebook users engage with Facebook pages in a variety of ways; they may like a post, a photo or a video posted by the page admin; they may comment, or they may post their own content. Whenever users do something on a page and Facebook provides information about it, DataSift creates an interaction object that you can filter for.
The Facebook Pages Managed Source type accesses the Facebook API on your behalf to collect data. The platform manages the collection and deduplication of data, adhering to API rate limits, and complies with authentication requirements of the Facebook API.
Each request made by the platform to Facebook must be authenticated using a valid access token. When you configure an Facebook Pages Managed Source you provide an OAuth 2.0 Access Token issued by Facebook that is used by the platform.
Facebook access tokens
The Facebook API supports a number of types of access token which can be used with managed sources.
When accessing Facebook Pages you should use an App Access Token that represents your application, or a User Access Token that represents your end customer.
The types of tokens and process for obtaining tokens are explained on the Facebook access tokens page.
Configuring Facebook Pages Managed Sources
Your DataSift account allows you to create multiple Facebook Pages Managed Sources. Each source will be assigned its own
id, have its own independent settings, and can be assigned one or more unique resources to track.
To use Instagram features via the Graph API you'll need to follow the Instagram on Facebook guide.
When you configure a Facebook Pages source you can choose which types of interactions to receive.
You can choose whether to receive:
- post likes, page likes, and comments.
- aggregated counts of post likes, comments and shares.
- posts that relate to the page but have not been created by the page's owner.
Configure this option using the parameters argument when creating or updating the source.
With this type of managed source a resource represents a single Facebook page to monitor.
When you use the dashboard to configure a source you will be asked to select one or more pages to monitor.
When you call the /source/create endpoint you provide a list of pages to monitor using the
Each source must have at least one Facebook access (auth) token. Access tokens are discussed in detail on the Facebook access tokens page.
If you provide more than one access token then the source will rotate between tokens, allowing your source to consume more data. See the Managed Sources best practice guide for more details.
To monitor location-restricted Facebook Pages, make sure that your access token comes from an account predominantly used in the area that the page is restricted to.
You configure access tokens for use by the source using the auth parameter when managing sources.
Facebook imposes strict rate limits based on the access tokens you provide.
To help avoid problems the platform:
- automatically collects data from Facebook Pages at a rate that should not cause you to hit your token's rate limit.
- prevents you from creating more than one token for the same Facebook account across one or more managed sources, as these tokens share the same rate limit.
The platform works on the assumption that the access tokens you provide are not used outside of your Facebook Pages managed source, in order to efficiently schedule requests within Facebook's rate limit and ensure an unintterupted flow of data.
Note that we use v2.x of the Graph API to access data from Facebook. As of v2.0 of the Graph API IDs for users are now app-scoped. If you use multiple tokens from different apps for your managed source you will may see inconsistencies due to this change in ID scoping. You can read more detail on our community site.
A running source will ingest data from the Facebook API. Data arrives as interactions in the platform which you are able to filter against.
You can use any of the Facebook Pages targets for your filter conditions.
Each Facebook Page interaction contains information about the Facebook object that represents some action, a Facebook link to that object, object type identifier, and the text of the accompanying message, if it exists.
If an interaction refers to engagements on a Facebook post (such as a comment), then it will carry additional information to associate it with the Facebook post that was engaged with, such as post id, link, message text, and type.
If you set the
trueyou will receive
like_countinteractions. These interactions are delivered periodically and summarize the number of likes for each post, including the delta in the count since the previous count for the post.
If you set the
trueyou will receive
comment_countinteractions. These interactions are delivered periodically and summarize the number of comments for each post, including the delta in the count since the previous count for the post.
If you set the
trueyou will receive
share_countinteractions. These interactions are delivered periodically and summarize the number of shares for each post, including the delta in the count since the previous count for the post.
commentsparameter will deliver comments on any Facebook posts you receive on this source.
posts_by_othersparameter will deliver posts made by individuals to the Facebook Page you are monitoring.
taggedparameter will deliver posts made by individuals which mention this Facebook Page.
page_likesparameter will regularly deliver aggregate posts reporting the nubmer of Likes this Page currently has.
Initially, the output will contain up to seven days' worth of data, then data will be delivered as it is received from the source.
We only monitor posts for a window of seven days. Any new comments or likes to a post that is older than seven days will not be picked up, even if that post was created after you begun running your Facebook Pages managed source.
Note: this window of seven days relates to content placed on pages that you monitor by the page owner. Optionally you can monitor posts by other people, but we only look back 24 hours for these. For further information take a look at the posts_by_others parameter which is described on our Facebook /source/create options page.
- Reactions are not reported separately; these are included within the like count aggregate.
To get started read our Activate a Facebook Pages Managed Source guide. This guide shows you how to configure a managed source using a Facebook User Access Token using the DataSift dashboard.
Read the API step-by-step guide to learn how to configure sources using the API.
It's easy to get started with Managed Sources but there are important points to keep in mind.
Read our Managed Sources best practice guide for an overview of our recommendations.