From: operator not working in Full archive Sandbox?

user
premium

#1

I’m working on an application using the full archive api, fetching tweets in the Sandbox dev enviornment. My query looks like ‘eggs OR apples OR bananas from:screen_name’

I can see tweets returning containing the above keywords, but they are from every account on twitter. Is the ‘from:’ operator disabled in Sandbox mode?


#2

Hi @nicky_robby - The from: operator works with Sanbox. The reason this isn’t working the way you want it to is because when combining AND and OR functionality in a single rule, the following order of operations will dictate how your rule is evaluated:

  1. Operators connected by AND logic (whitespace) are combined first
  2. Then, operators connected with OR logic (OR) are applied

So the way your rule is currently set up translates like this: eggs OR apples OR (bananas from:screen_name) and this will return all Tweets from the given screen name with the keyword ‘bananas’, as well as all Tweets from any user that mention the keywords ‘apples’ or ‘eggs’.

If you want your rule to match Tweets that contain the words ‘eggs’, ‘bananas’ or ‘apples’ from one given user only, your rule should look something like this:

(bananas OR apples OR eggs) from:screen_name

You can read more about building rules in our documentation here: https://developer.twitter.com/en/docs/tweets/rules-and-filtering/guides/using-premium-operators#order-of-operations

I hope this helps!


#3

Hey, thank you for responding…this fixed my issue!