How to insure all author related content is targeted?


#1

I want to insure that I see ALL activity by and about an author. For Facebook and Twitter, do I need to use all of the following? I want to optimize the call.

(
interaction.type == “twitter” AND
(
interaction.author.id == 12345678 OR
interaction.author.username == “AuthorName” OR
twitter.mentions == “AuthorName” OR
twitter.mention_ids == 12345678 OR
twitter.retweet.mentions == “AuthorName” OR
twitter.in_reply_to_screen_name == “AuthorName” OR
twitter.retweeted.user.screen_name == “AuthorName” OR
twitter.retweeted.user.id == 12345678
)
)
OR
(
interaction.type == “facebook” AND
(
interaction.author.id == 123456789012 OR interaction.author.username == “Author Name” OR
facebook.author.link == “www.facebook.com/AuthorName” OR
facebook.author.name == “Author Name” OR
facebook.to.ids == “123456789012” OR
facebook.to.names == “Author Name”
)
)


#2

You are on the right track, but you have some unnecessary repetition in here. 

Twitter users have both a screen_name, and a user ID, so searching for interaction.author.id and interaction.author.username will give you exactly the same results.

The same is true for twitter.mentions and twitter.mention_ids - you only need to include one of these. Also, twitter.in_reply_to_screen_name is a type of twitter.mention. If a Tweet is sent to another Twitter user as a result of pressing a 'reply' button, both twitter.mentions and twitter.in_reply_to_screen_name will be populated with the same @username.

Something like the following would be more appropriate:

I have used the 'in' operator rather than '==' as it allows us to easily add more usernames to track: twitter.mentions in "DataSift, DataSiftDev, ....."


#3

Excellent. Exactly what I was looking for. Thank you!


#4

This is very helpful and a good example of the filter language. I’m brand new to datasift and I’m getting tweets fine, but no facebook data no matter what I do.


#5

Bob, Could you please raise this as a separate discussion? This is a separate issue.


#6

In the example above, could the twitter.mentions and twitter.retweet.mentions lines be replaced simply with:

interaction.mentions in “DataSift”

Doesn’t that capture both original tweet mentions and retweets with mentions?


#7

Yes, they could - this examples was written before we released the interaction.mentions target.