Table of Contents

Search

  1. Preface
  2. Introduction to PowerExchange for Twitter
  3. PowerExchange for Twitter Configuration
  4. Twitter and Twitter Streaming Connections
  5. Twitter and Twitter Streaming Data Objects
  6. Twitter Mappings
  7. Datatype Reference

PowerExchange for Twitter User Guide

PowerExchange for Twitter User Guide

Query Parameter for Twitter Resources

Query Parameter for Twitter Resources

Use the query parameter to specify the search criteria.
When you create a Twitter data object, you specify the query parameter that the Data Integration Service uses to search for Twitter data. The query parameter must include the mandatory parameter. Each resource has one mandatory parameter.
You can use Twitter search operators with the mandatory parameter. The Twitter search operators such as OR, @, and ? that you can use are defined in the Search Operators section of the documentation for the Twitter Search API. For example, you specify the following query parameter to extract tweets that contain the keyword apple with a positive attitude:
QUERY=Apple:)
The following table describes the mandatory parameter for each resource:
Resource
Mandatory Parameter
Description
Followers
screen_name
user_id
Screen name or user ID. Specify the screen name or user ID of the Twitter account for which you want a list of followers. For example, you specify the following query parameter to extract a list of Twitter IDs of the followers of the Twitter screen name Rinnovator:
screen_name=Rinnovator
Friends
screen_name
user_id
Screen name or user ID. Specify the screen name or user ID of the Twitter account for which you want a list of friends. For example, you specify the following query parameter to extract the Twitter IDs of the friends of the Twitter screen name Rinnovator:
screen_name=Rinnovator
Profile Lookup
screen_name
user_id
Screen names or user IDs. Specify the screen name or user IDs of the Twitter account for which you want the profiles.
Specify the profile query parameter in the following formats:
  • You can specify up to 100 comma-separated screen names or user IDs.
  • You can specify a valid user ID or a screen name to extract the profile of a user.
  • You can specify a list of user IDs or screen names in a .txt or .csv format to extract the profiles of users.
Search
QUERY
Search keyword. Specify the comma-separated keywords to search for tweets. For example, you specify the following query parameter to extract the tweets that contain the keywords Apple, Lenevo, or HTC:
QUERY=Apple,Lenovo,HTC

Profile Lookup Resource

You can use the profile lookup resource to extract the user profiles that match the specified user ID or screen name.
Specify the profile query parameter in the following formats:
  • Comma-separated list. You can specify up to 100 comma-separated screen names or user IDs.
    Use the following format to specify the profile query parameter as a comma-separated list:
    user_id=<comma separated list of user_id>
    screen_name=<comma separated list of screen_name>
    For example, you specify the screen name in the following query parameter to extract the Twitter profile of the Twitter screen name Rinnovator and nytimes:
    screen_name=Rinnovator,nytimes
    You can specify the user ID in the following query parameter to extract the Twitter profile of the Twitter user ID 123 and 245:
    user_id=123,245
    The profiles might not be listed in the order they are specified in the query parameter.
  • Valid user ID or screen name. You can specify a valid user ID or a screen name.
    Use the following format to specify the profile query parameter with a valid user ID or screen name:
    user_id=<valid twitter userid>
    screen_name=<valid twitter screen name>
    For example, you specify the screen name in the following query parameter to extract the Twitter profile of the Twitter screen name Charley Rarely:
    screen_name=CharleyRarely
    You can specify the user ID in the following query parameter to extract the Twitter profile of the Twitter ID 544282590:
    user_id=544282590
  • List in a .txt or .csv file. You can specify a list of user IDs or screen names in a text or csv file to extract the profiles of users.
    Use the following format to specify the profile query parameter as a list in a .txt or .csv file:
    user_id=file:///<file_path/userid_file>
    screen_name=file:///<file_path/screennames_file>
    For example,
    user_id=file:///E:/SocialMedia/twitter_userid.txt
    screen_name=file:///E:/SocialMedia/twitter_screenname.txt

0 COMMENTS

We’d like to hear from you!