ODBC Driver for Twitter

Build 24.0.9060

Tweets

Create, delete, and query status updates and tweets from the authenticated user.

Table Specific Information

Select

Tweets posted on Twitter will appear here. Tweets may come from the authenticated user's home page, they may be searched for, or they may come from a specific user or list. Note that some columns will always be null unless the SearchTerms pseudo column is specified.

By default, Tweets will return tweets from the authenticated user's home page. By specifying SearchTerms, tweets that match the terms used in the search will return. Valid search terms may be found under the topic "Standard Search Operators", located here: https://developer.twitter.com/en/docs/tweets/search/guides/standard-operators.

Note:SearchTerms may not be used with Screen_Name, User_Id, List_Id, Slug, Owner_User_Id, or Owner_Screen_Name.

The Screen_Name and User_Id pseudo columns can be used to return tweets made by the specified user. Alternatively, use the From_User_Name and From_User_Id columns to do the same thing.

The List_Id pseudo column may be specified to return tweets made in a specific list. Alternatively, the list may be specified using the Slug and either Owner_User_Id or Owner_Screen_Name.

The Min_Id and Max_Id pseudo columns may be used to narrow down a range of tweets to return, or to return only recent tweets. Ids are created in increasing numerical order on Twitter. Specifying a Min_Id returns only results with a greater Id or tweets that were created more recently than the specified one. Setting a Max_Id will return only tweets that are older than the creation date of the specified Id. Note that while these values must be valid, non-negative numbers, they do not have to be Ids that exist.

Full Archive and 30-day Searches

By default, Twitter only supports returning Tweets from searches that are up to 7 days old. However, customers with premium accounts may retrieve tweets older than this by executing either a 30-day or full archive search.

The EnvType and DevEnvironment pseudo columns may be used to query Premium Search APIs. EnvType specifies the environment type. It can take one of 30day or fullarchive values. The default value is 30day. The DevEnvironment is required in order to query the Premium Search API and must be set to the value of the dev environment label, created in your Twitter Developer Account. You should use a Premium or Enterprise app in your OAuth connection properties to use the feature. A SearchTerms value must be specified in order to use this feature.

Insert

In order to insert a tweet, simply specify the text of the tweet in the INSERT command. For example:

INSERT INTO Tweets (Text) VALUES ('Hello World')

In order to insert a tweet with media, specify the text of the tweet and the media file paths MediaFilePath for every media file in the INSERT command.You may include up to 4 photos or 1 animated GIF or 1 video in a Tweet. For example:

INSERT INTO Tweets (Text, MediaFilePath) VALUES ('Hello World', 'C:\\myfile.jpg,C:\\myfile2.jpg')

If you already have media ids you can insert them in a tweet by providing media ids MediaId of every media, in INSERT command. For example:

INSERT INTO Tweets (Text, MediaId) VALUES ('Hello World', '123456789,123456789')

In order to retweet an existing tweet, specify the Id column when inserting the tweet. For example:

INSERT INTO Tweets (Id) VALUES ('123456789')

Columns

Name Type ReadOnly Description
ID [KEY] String False

The Id of the status update or tweet. Set this value when inserting to retweet an existing tweet.

IDLong String False

The long type Id of the status update or tweet.

SearchTerms String False

The SearchTerms to search against. This cannot be used with the Screen_Name or User_Id inputs. For more information on using the advanced query operators, see the Twitter API documentation here: https://dev.twitter.com/docs/using-search. Roughly 1500 results can be returned using the SearchTerms.

Created_At Datetime True

When the tweet was made.

Text String False

The text of the tweet.

Lang String True

Language code the tweet was made in.

Source String True

Source of the tweet.

Favorited Boolean True

Boolean indicating if this tweet has been favorited.

Favorite_Count Integer True

The approximate number of times this tweet has been favorited.

Retweeted Boolean True

Boolean indicating if this tweet has been retweeted.

Retweet_Count Integer True

The number of times the tweet has been retweeted.

Retweeted_Status_Id String True

Id of the tweet which was retweeted by this one. Empty if the current tweet is not a retweet.

Truncated Boolean True

Boolean indicating if this tweet has been truncated.

Filter_Level String True

Indicates the maximum value of the Filter_Level parameter that can be used and still stream this tweet.

Possibly_Sensitive String True

This field is available only when a tweet contains a link. The meaning of the field does not pertain to the tweet content itself, but instead it is an indicator that the URL contained in the tweet may contain content or media identified as sensitive content.

Withheld_Copyright Boolean True

When present and set to true, indicates that this piece of content has been withheld due to a DMCA complaint.

Withheld_Scope String True

When present, indicates whether the content being withheld is the status or a user.

Withheld_In_Countries String True

A list of uppercase, two-letter country codes this content is withheld from.

Contributors String True

An XML collection of user objects (usually only one) indicating users who contributed to the authorship of the tweet, on behalf of the official tweet author.

Coordinates_Coordinates String True

The geographic coordinates of this tweet (longitude first, then latitude).

Coordinates_Type String True

The type of coordinate, if applicable.

Place_Full_Name String True

The full name of the location of this tweet (city and state).

Place_Country String True

The country of origin of this tweet.

Current_User_Retweet_Id String True

Details the tweet Id of the authenticated user's own retweet (if it exists) of this tweet.

Scopes String True

A set of key-value pairs indicating the intended contextual delivery of the containing tweet. Currently used by Twitter's promoted products.

In_Reply_To_Status_Id String True

Represents the Id of the original status if this tweet is in reply to another.

From_User_Id String True

Id of the user who made the tweet. Use this in the WHERE clause to get tweets for the specified user.

From_User_Screen_Name String True

Screen name of the user who made the tweet. Use this in the WHERE clause to get tweets for the specified user.

From_User_Name String True

Name of the user who made the tweet.

From_User_Location String True

Location of the user who made the tweet.

From_User_Profile_URL String True

URL to the user who made the tweet. This is not returned when a SearchTerms is specified.

From_User_Profile_Image_Url String True

URL to the profile image for the from user.

To_User_Id String True

Id of the user who made the tweet. Use this in the WHERE clause to get tweets for the specified user.

To_User_Screen_Name String True

Screen name of the user who made the tweet.

User_Mentions String True

Mentions of other users in the tweet, returned as an XML aggregate.

URLs String True

URLs in the tweet, returned as an XML aggregate. If SearchTerms is specified, set Include_Entities=true to retrieve URLs.

Hashtags String True

Hashtags in the tweet, returned as an XML aggregate. If SearchTerms is specified, set Include_Entities=true to retrieve Hashtags.

Media String True

Media in the tweet, returned as an XML aggregate. If SearchTerms is specified, set Include_Entities=true to retrieve Media.

Pseudo-Columns

Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.

Name Type Description
NextPageToken String

An identifier to retrieve the next page of results. Specify only if an error occurs during the original request. Make sure any criteria specified in the original request are still specified when using the NextPageToken.

Min_ID String

Specifies the lowest Id to return results for. Ids are stored in increasing numerical order, so specifying this value means that only tweets that are equal to or newer than the creation date of the specified Id will be returned. The Min_Id must be a valid number but does not need to be a valid tweet Id.

Max_ID String

Specifies the highest Id to return results for. Ids are stored in increasing numerical order, so specifying this value means that only tweets that are equal to or older than the creation date of the specified Id will be returned. The Max_Id must be a valid number but does not need to be a valid tweet Id.

Include_Entities Boolean

Boolean indicating whether or not to include entities such as URLs, hashtags, and user mentions in the response.

The default value is false.

Include_Retweets Boolean

Boolean indicating whether or not to include retweets in the result set. Only useful when no filters are specified (listing own tweets), From_User_Id, From_User_Screen_Name are specified (listing a user's tweets) or when List_Id is specified (listing the tweets from a list of User ids). Has no effect when used with SearchTerms. By default twitter includes retweets.

The default value is true.

Result_Type String

Indicates the type of results to return when using a SearchTerms. Currently Twitter has only popular and recent results.

The allowed values are popular, recent.

List_Id String

Used to specify the list Id to retrieve tweets from. This value does not work with SearchTerms, Screen_Name, or User_Id.

Slug String

Alternative method of specifying a list. Use this in with an Owner_User_Id and Owner_Screen_Name to specify a list without a List_Id.

Owner_User_Id String

Alternative method of specifying a list. Use this with a Slug to specify a list without the list Id.

Owner_Screen_Name String

Alternative method of specifying a list. Use this with a Slug to specify a list without the List_Id.

Geocode String

If this parameter is used with a SearchTerms, the query will return tweets from the specified geographical location. The geocode is specified in this manner: Lat,Long,Radius. For example: 37.781157,-122.398720,25mi

RetweetId String

When making a new tweet, specify this value to retweet the specified tweet.

MediaId String

A comma-separated value of media Ids to associate with the tweet. You may include up to 4 photos or 1 animated GIF or 1 video in a tweet.

MediaFilePath String

A comma-separated value of media file paths to associate with the tweet. You may include up to 4 photos or 1 animated GIF or 1 video in a tweet.

EnvType String

The environment type you want to use.

The allowed values are 30day, fullarchive.

The default value is 30day.

DevEnvironment String

To begin using the new Premium APIs, you need to setup one or more dev environments for the endpoint and connect it to an app.

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 24.0.9060