How do I create a stream of a twitter profile?


#1

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

error message…
The target twitter.user.name interaction.content does not exist


#2

Have you taken a look at our Twitter target?

twitter.user.name 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"
OR
twitter.mentions in "datasift, datasiftdev" )
AND
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 twitter.user.name or twitter.user.screen_name. 


#3

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?


#4

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.


#5

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!


#6

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