twitter.text

The 140-character text of a Tweet.

DataSift's filtering engine strips URLs and @mentions from the text of the Tweet so make sure you select your target carefully:

Use this target: To filter for this content:
twitter.text The text of a Tweet only.
twitter.links Links embedded in a Tweet.
twitter.domains Domains of links embedded in a Tweet.
twitter.mentions Twitter user screen names mentioned in a Tweet.

You can write a filter that looks for "bitly" in twitter.text like this:

twitter.text contains "bitly"

It matches this Tweet: "Have you used bitly today?"

However, to filter for the link in this Tweet: "Take a look at http://bitly.com/r6pmP0"

you would use the twitter.links or twitter.domains targets or the Links augmentation.

Similarly, to look for Tweets that refer to a specific user like this one: "Have you tried @DataSift yet?"

you would use the twitter.mentions target.

Examples

  1. Filter for Tweets that refer to a birthday:

    twitter.text contains_any "happy birthday, birthday, bday, b\'day"

  2. Filter for people talking about the 2012 Olympics on Twitter:

    twitter.text contains "Olympics"
    AND
    twitter.text contains "2012"

Notes

You cannot filter for usernames or links in the twitter.text target.

For example, suppose the original text of a Tweet is:

"@DataSift launched today! http://bitly.com/r6pmP0"

The Tweet will not match against this filter:

"twitter.text contains "@datasift"

OR twitter.text subst "bitly"

It will match against this filter:

twitter.text contains "launched today"

Resource information

Target service: Twitter

Target object: Twitter: Tweet

Type: string

Array: No

Always exists: No