Creating a Twitter data set record
You can create a Twitter data set record to track and analyze the text-based content that is posted on the Twitter social media site. By analyzing users' input, you can gain insight that helps you to structure the data in your application to deliver better services to customers and increase your customer base. For example, by tracking and analyzing tweets about your organization or your products, you can discover whether the customer response to the release of one of your product was positive or negative.
Use the Twitter data set to filter tweets according to the keywords that you specify. First, create a Twitter data set to connect with the Twitter API. Next, reference the data set from a data flow and use the Text Analyzer rule to analyze the text-based content of tweets.
Caution: Do not reference one instance of the Twitter data set in multiple data flows. Stopping one of such data flows, stops the Twitter data set in the other data flows.
Prerequisites:
Before you create a Twitter data set, complete the following tasks:
- Register a Twitter application for your Twitter account on the Twitter applications portal to obtain the OAuth settings that you need to specify in the Twitter data set.
- Optional: Obtain the Klout score API key from the Klout website. Klout provides metrics that determine the user social influence.
- In Designer Studio, click +Create > Data Model > Data Set.
- Enter the data set label and identifier.
- From the Type list, select Twitter.
- Specify the ruleset, Applies-to class, and ruleset version of the data set.
Note: The Applies-to class for Twitter data sets must always be Data-Social-Twitter.
- Click Create and open.
- In the Retrieve tweets section, select the way in which your application retrieves tweets form the data set:
- Stream – Retrieves new tweets dynamically; as they are posted.
- Playback – Retrieves historical posts from the specified time period in the past. Use this mode for data retrieval purpose, for example, when you want to retrieve the tweets made while your application was inactive.
- On the Twitter tab, complete the Access details section with the OAuth settings from the Twitter application that you created:
- Consumer key
- Consumer secret
- Access token
- Access token secret
- Optional: In the Access details section, enter the Klout score API key to see the metrics about the social influence of the Twitter users that you track.
-
In the Keywords section, perform the following actions:
- Optional: Select the Search only in tweet text (ignore author handles and profile) check box to limit data retrieval to the text-based content of tweets.
- click Add keyword and enter the words that you want to find in the tweets.
You can also enter the Twitter authors that you want to find in tweets (for example, @JohnSmith).
- In the Retrieve timeline section, click Add author and enter the names of users whose tweets you want to analyze.
Note: As a best practice, complete either the Keywords or Timeline section for your application to filter the data effectively.
- Optional: In the Ignore section, click Add twitter handle, and enter the names of users whose posts you want to ignore.
Note: See the Twitter REST API documentation for information about limitations when specifying keywords and authors.
-
In the Search section, specify the retrieval settings for tweets:
-
Specify the time period during which tweets were made to retrieve the those tweets. For example, you can retrieve tweets made within the last 24 hours.
- Optional: Select the Search for a maximum number of tweets check box and enter the maximum number of tweets for the system to retrieve.
Note: The Search section appears only when you select the Playback option in the Retrieve tweets section.
- Optional: Click the Advanced options tab to configure additional options for filtering the data that is retrieved the Twitter data set.
-
Click Save.
Open topic with navigation