Activate Instagram Managed Source

warning icon

This guide shows you how you can activate a managed source for demonstration and test purposes only.

For production usage you must configure your Managed Sources via the API.

1. Activating Instagram Managed Source

Log in to your account.
Click the Sources tab.

Select Managed Sources to view available managed sources.

man_src_list_4

Locate Instagram and click the + button to add a new instance of the Instagram 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 Instagram Instance

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

Access Tokens

Access tokens are generated by authenticating your Instagram user account with an Instagram application. The DataSift user interface offers the ability to generate user tokens from the whitelisted DataSift Instagram application. This method is not scalable as you are required to log into the DataSift user interface in order to generate new tokens, rather than have end customers authenticate their Instagram user accounts with your Instagram application from within your product.

The Instagram Managed Source uses Instagram access tokens to authenticate users to a private page. An Access Token is assigned to one Instagram account. If additional Instagram instances are required, use a different Instagram account.

To obtain an Access Token from Instagram, click Add Token button in the new managed source instance.

Login to in Instagram to obtain your Access token generated by Instagram.

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

Click Authorize button to confirm DataSift can store the token.

A new Access token has been generated by Instagram.

Now we have a valid access token, complete the New Instagram Managed Source form. Enter a name for this instance, in the example the instance name is FIFA World Cup 2014. This instance will monitor interations including Comments and Likes.

There are three resource types to monitor, User, Tag and Location. Click down arrow to view a list of Resource Types.

Select Tag from the list.

Add WorldCup to the Tag field to include all Instagram objects that contain this hashtag. More than one resource type can be added to an instance, click Add Another to add another resource type.

Select User Resource Type and enter a search string for Instagram users you want to filter. The example uses fifaworldcup. Click Search button.

Select the fifaworldcup user listed in the search results.

Click Save to complete the configuration of this instance.

Click on Sources > My Managed Sources to view the new Instagram managed 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 an Instagram Stream

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

To create a filter, locate CSDL code to enable an Instagram instance to be used in a filter. Click on Sources tab and select My Managed Sources to view the new Instagram Managed source. Click on the new instance, scroll down and select How to use button.

Scroll down to In Streams section.

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

Create a new Instagram 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 Instagram instance information into the filter, in my example I have copied the source.id, and I have also added another condition that contains the instagram.geo target attribute.

The instagram.geo target matches objects posted around Sao Paulo, Brazil.

Click Save and Close.

The Instagram documentation page has more information on Instagram targets.

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 live preview.

No interactions are displayed as the FIFA World Cup 2014 managed source has not been started.

4. Starting an Instagram Managed Source

Start the new Instagram managed source to enable the platform to filter for interactions. Open My Managed Sources tab in a new browser tab.

Click Start button on the FIFA World Cup 2014 source.

Click Start Source.

The FIFA World Cup 2014 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 Instagram managed source.

Click the pause button.

6. Analyzing Video Interactions

To display an Instagram video 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 Instagram object is a video which is described in the output attribute instagram.type, instagram.filter describes the filter used to modify the object, the example is Normal, no filter has been applied. The attribute instagram.link contains a link to the actual video.

Expand instagram.video to view information about the resolutions available for this video.

Expand instagram.tags to view information about the hashtags included in the post. There are two hashtags, indexed as 0 and 1, the worldcup hashtag matches the Tag that was configured during the creation of the instance.

Expand instagram.images to view image resolution information. An image is displayed when the video is presented for playing.

Expand instagram.caption to view the caption associated with the image, the text also includes the hashtags. Expand instagram.caption.from to display information about the user that posted the video.

Expand instagram.from to view additional information about the user who posted the video.

Expand instagram.geo to view coordinates where the video was created.

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

The browser displays the Instagram object. The Instagram user is referenced at the top of the post followed by the caption, which also includes the tags. The object data matches the attributes displayed in the interaction ouput.

7. Analyzing Photo Interactions

To display an Instagram photo 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 Instagram object is an image which is described in the output attribute instagram.type, instagram.filter describes the filter used to modify the image, the example is Mayfair. The attribute instagram.link contains a link to the actual photo.

Expand instagram.tags to view information about the hashtags included in the post. There are two hashtags, indexed as 0 and 1, the worldcup hashtag matches the Tag that was configured during the creation of the instance.

Expand instagram.images to view image resolution information.

Expand instagram.caption to view the text associated with the photo, which includes the hashtags. Expand instagram.caption.from to view information about the user that posted the photo.

Expand instagram.from to view additional information about the user who posted the photo.

Expand instagram.users_in_photo to view a list of users tagged in the photo. The example, has one user tagged.

Expand instagram.geo to view coordinates where the photo was taken.

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

The browser displays the Instagram object. The Instagram user is referenced at the top of the post followed by the caption, which also includes the hashtags. The object data matches the attributes displayed in the interaction ouput.