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 products 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 a Twitter data set from multiple data flows because stopping one data flow stops the Twitter data set in all other data flows.
-
In Dev Studio, click .
-
Provide the data set label and identifier.
-
From the Type list, select Twitter.
-
Provide 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 when they are posted.
- Playback – Retrieves historical posts from the time period
that you provide. For example, you can use this mode when you want to retrieve the
tweets made while your application was inactive.
-
On the Twitter tab, in the Access details
section, provide the following OAuth settings from your Twitter application:
- Consumer key
- Consumer secret
- Access token
- Access token secret
- Optional:
View the metrics about the social influence of the Twitter users that you track. In the
Access details section, enter the Klout score API key.
-
In the Keywords section, perform the following actions:
- Optional:
Limit data retrieval to the text-based content of tweets by selecting the
Search only in tweet text (ignore author handles and profile)
check box.
-
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 (for example, @LouiseSimpson).
- Optional:
Enter the names of users that you want to ignore. In the Ignore
section, click Add twitter handle, and enter appropriate user
handles.
Note: See the Twitter REST API documentation for information about limitations when
specifying keywords and authors.
-
In the Search section, define the retrieval settings for tweets:
-
Enter a range of time during which tweets were made. 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 is displayed only when you select the
Playback option in the Retrieve tweets section.
- Optional:
Configure additional options for filtering the data that is retrieved by the Twitter
data set by clicking the Advanced options tab.
-
Click Save.