Importing a Twitter Stream

Before You Begin: API Key

You can use the data builder to import tweets from Twitter that meet the search criteria that you specify. The data builder uses the search API that is offered by Twitter. To perform the search, you must create a Twitter application record with Twitter for your installation of the data builder to get the API key.
Twitter provides information about creating a Twitter application record and getting an API key at https://dev.twitter.com/docs/faq#7447.
The high-level steps are as follows:
  1. Log on to https://dev.twitter.com/apps with your Twitter account.
  2. Create a new Twitter application. You need to specify a name, description, website, and callback URL, and then accept the terms and conditions.
    Note: The values for these fields are not used by the data builder. You need to create the Twitter application only so that you can get the API key.
  3. After you create the Twitter application, record the values for the following fields:
    • Consumer key
    • Consumer secret
    • Access token
    • Access token secret
    You need to enter these values when you set up access to the Twitter stream in the data builder.

Importing Tweets

To search for tweets and load them into SAS LASR Analytic Server, follow these steps:
  1. Select Filethen selectImport Datathen selectTwitter Stream.
  2. Enter a search term and the maximum number of tweets to return.
    Tip
    The search operators that you can use are described at https://dev.twitter.com/docs/using-search.
    Each tweet that matches the search term is stored as a row in a SAS LASR Analytic Server table.
    Note: SAS does not support search terms that include double-byte characters.
  3. (Optional) In the LASR Table section, enter the name for the table and a description. Review the library and location settings by clicking Advanced and make changes if necessary.
  4. If this is the first time you are importing tweets, then enter values for the fields in the Twitter API Key section.
  5. (Optional) Review the Proxy Server section and make changes if necessary.
  6. Click OK.
Note: Rate limits might apply to the Twitter service. Such limits are outside of the control of SAS. You are required to follow all applicable terms of use that Twitter and others might promulgate as to the Twitter data.
Note: Certain functionality in the software enables the user to invoke external third-party resources. Be aware that use of these resources might result in disclosure and transmission of information that the user submits to these resources.