How do I create a stream of a twitter profile?


This code did not work for username or ID… interaction.content contains “hisname”

error message…
The target interaction.content does not exist


Have you taken a look at our Twitter target? filters on the "real name" the user has assigned to their profile. twitter.user.screen_name is probably what you are looking for - this will filter on the user's Twitter @username.

So as an example, let's say we wanted to set up a stream that looks for every Tweet either from, or mentioning one of the DataSift Twitter accounts, and the post is talking about "Big Data":

twitter.user.screen_name in "datasift, datasiftdev"
twitter.mentions in "datasift, datasiftdev" )
interaction.content contains "Big Data"

Note: You should NOT include the @ symbol when listing usernames to look for if you are using targets such as or twitter.user.screen_name. 


Hi Jason. THANKS. But sorry, still a bit confused. for example, if the username is robfinn, what would be the code to return that stream of tweets? just the stream, no filters?


If you only wanted to receieve the stream of Tweets posted by robfinn, the CSDL would be:

twitter.user.screen_name in "robfinn"

If you wanted to receive a stream of Tweets sent to robfinn (or MENTIONING robfinn), the CSDL would be:

twitter.mentions in "robfinn"

I hope this clears it up? I would recommend taking a look at our CSDL Language Guide for a bit of background on the language. You should be able to find everything you need in there.


Hi Jason, still not working.

twitter.user.screen_name in “robfinn”

That code hangs on compiling. Maybe something wrong with my account setup?

Thanks for all the help!


It appears you are yet to sign your Twitter licence. Head to our Licences page, sign the Twitter licence, and hopefully everything should work.