Activate Facebook Pages Managed Source

1. Activating Facebook Pages Managed Source

Log in to your account.
Click the Sources tab.

Select Managed Sources to view available managed sources.

Locate Facebook Pages and click the + button to add a new instance of the Facebook Pages source.

The first time you activate a managed source you are required to complete the license agreement. Fill in the form and click Agree button.

2. Creating a New Facebook Pages Instance

To create a new instance of Facebook Pages after the license terms and conditions have been accepted, click + on the Facebook Pages managed source.

Access Tokens

Facebook Pages Managed Source uses Facebook access tokens to authenticate users to a private page. There are two types of access token, User and App. User Access Tokens enable access to localized and age-restricted content, but are only valid for two months and are not automatically renewed. App Access Tokens never expire, but they will not give you access to Facebook Pages that impose location or age restrictions. An Access Token is assigned to one Facebook account. If additional Facebook Pages instances are required, use a different Facebook account.

To obtain a User Access Token from Facebook, click Add Token button in the new managed source instance.

Login to Facebook to obtain your User Access token generated by Facebook.

Note: DataSift does not store your password or email address, but will store the User Access Token returned by Facebook.

A new User Access token has been generated by Facebook.

Now we have a valid user access token, complete the New Facebook Pages Managed Source form. Enter a name for this instance, in the example the instance name is Jimmy Choo Pages. This instance will monitor interations for Comments, Likes and Posts on the company pages of Jimmy Choo which sells luxury brands of shoes and accessories.

Enter a search string for pages you want to filter.

Select the pages in the search results you want to filter on and click Select Pages button.

Selected pages are displayed in the Activated pages list. Click Save to complete the configuration of this instance.

Note: You may search and add more sites to the Activated pages list, for example, if this instance contains a list of Pages from competitive companies.

Click on Sources > My Managed Sources to view the new Jimmy Choo Pages source.

Click on the new instance to view a summary of attributes including a unique ID for this source.

Note: It is best practice to start consuming a stream from a managed source before starting it.

3. Creating a Facebook Pages Stream

A stream is all the social media interactions and extra data added by DataSift as a result of your filter.

Click on Sources tab and select My Managed Sources to view the new Facebook Pages Managed source, then click on the new instance. Scroll down and select How to use button.To create a filter, get CSDL code to enable a Facebook Pages instance to be used in a filter.

Scroll down to In Streams section.

Copy either the source.id or interaction.type CSDL code.

Create a new Facebook Pages filter. Click the Filters tab and click Create a Filter button.

Type in a name and description for your stream. Select the CSDL Code Editor and click the Start Editing button.

Copy the Facebook Pages instance information into the filter, in my example I have copied the source.id and included another condition that matches Facebook post or message content (facebook_page.message target attribute) that will match the string summer or yellow.

Click Save and Close.

For more information on Facebook targets, see the Facebook Pages targets documentation.

A summary of the configured stream is shown along with the cost (in Data Processing Units) and options to run the stream or edit it again. Click Live Preview.

Click the Play button at the bottom of the screen to start the live preview.

No interactions are displayed as the Jimmy Choo Pages managed source has not been started.

4. Starting a Facebook Pages Managed Source

Open My Managed Sources in a new browser tab.

Click Start button on the Jimmy Choo Pages source.

Click Start Source.

The Jimmy Choo Pages instance has been started.

5. Verifying Filter Conditions

Now the managed source is running, use Live Preview to verify filter conditions are matching interactions correctly. Go back to the browser tab that has Live Preview running. A burst of interactions appear, then interactions continue in real time.

Note: DataSift monitors posts for a window of seven days. Any new comments or likes to a post that is older than seven days will not be filtered, even if the post was created after running the Facebook Pages managed source.

Click the pause button.

6. Analyzing Post Interactions

To display a Facebook Pages Post interaction in more detail, move the mouse pointer over an interaction and a debug symbol is displayed. Click on the interaction to reveal more information.

Use the debug window to view interaction output data. In the example, the Facebook object is a photo which is described in the output attribute facebook_page.type, facebook_page.message contains the content of a post or comment, the example is a post and facebook_page.link contains a link to the actual post.

Expand facebook_page.from to view information about the entity who created the post, in this example the entity is a company.

Expand facebook_page.page to view information about the actual Facebook page including its link.

For more examples of the Facebook Pages namespace, see the Facebook Pages Namespace documentation.

Copy the facebook_page.link attribute value and paste it into a new browser window to view the original post.

The browser displays the Facebook object. Object name is Timeline Photo, the photo is referenced in the facebook_page.picture attribute and the message content matches the attributes displayed in the interaction ouput.

7. Analyzing Comment Interactions

Monitoring interations for Comments was enabled when the Jimmy Choo Pages instance was configured. To add a Facebook Page Comment to the Jimmy Choo Facebook page, open the browser window that was running Live Preview. Click the Play button at the bottom of the screen to start Live Preview again.

Post a comment In the browser window.

Open the browser window where Live Preview is streaming interactions. The comment posted by Julie Evans has been filtered in real time.

Move the mouse pointer over the interaction and click on it to display debug mode.

Use the debug window to view interaction output data. The Facebook object is a comment, which is desribed in the output attribute facebook_page.type, facebook_page.message contains the content of the comment.

Expand facebook_page.from to view information about the entity who created the post, in this example the entity is Julie Evans.

8. Analyzing Link Interactions

Monitoring interations for Likes was enabled when the Jimmy Choo Pages instance was configured. To generate a Like interaction using the Jimmy Choo Facebook Page, open the browser window that was running Live Preview. Click the Play button at the bottom of the screen to start Live Preview again.

Click the Like link in the browser window.

Open the browser window where Live Preview is streaming interactions. The Like posted by Julie Evans has been filtered in real time.

Move the mouse pointer over the interaction and click on it to display debug mode.

Use the debug window to view interaction output data, the Facebook object is a like which is desribed in the output attribute facebook_page.type.

Expand facebook_page.from to view information about the entity who liked the post, in this example the entity is Julie Evans.

9. Viewing Facebook Access Token Information

To view information about your access token, select the Jimmy Choo Pages source in Sources > My Managed Sources.

Click Edit this Managed Source button and copy the token in the Add Facebook Tokens to DataSift section.

Open a new browser window and go to Graph API Explorer.

Paste the token into the Access Token: field and click the Debug button.

Your access token details are displayed. My token expires in about two months time. The App ID field contains DataSift Pages which enables this token to be used to validate DataSift Facebook Pages managed sources.