Follow + Track in API level


#1

Hello, i’m trying to get, in API level, all the tweets from people who follow me with a specific #hashtag.
I know this is possible using follow + track methods separately. But here is a problem.
It would be nice to filter that in API level since some of my clients profiles has more than 1 million followers, leading me to have performance problems.
Is there anyway to do that?

I am using Twitter4j in java, for convenience, but I just need to know if the twitter API provides a way to do that.

qry.follow(idsArray).track(keywords);
// this causes to call follow OR track, and I need something like: follow AND track.

Thanks in advice, any help will be appreciated.


#2

Yes it is possible to combine both follow and track parameters per the docs for the filter endpoint. I haven’t played enough with Twitter4J to have experience on how you’d use both there.


#3

Hello @andypiper thanks for your reply, but considering I am passing a follow parameter with a list of ids, and a list of keywords on track parameter, if I understand it right the expected behaviour would be an OR between these 2, as your link says:

“The track, follow, and locations fields should be considered to be combined with an OR operator. track=foo&follow=1234 returns Tweets matching “foo” OR created by user 1234.”

And I need an AND operator between follow and track.
=/


#4

I just want to filter my followers tweets, with a certain keyword. Via Twitter API. That’s why can’t be an OR.


#5

Have you raised this with the Twitter4J developers?


#6

Not yet, because I am first raising if it is possible to do this with the Oficial Twitter API.
I only had been searching in lots of forums and this is the first thread about this.
If the official API doesn’t provide a way to do this, the Twitter4j “wrapper” wouldn’t do it also.
It has the same behavior as the API calling /statuses/filter making it an OR like in the
description.

I am studying how to implement it manually, but is sad. The performance will be very low in some cases.
Thanks for your help.


#7

@samirvarandas Did you have any luck with this? I am looking for the same - an AND operator for track and follow.


#8

That’s not possible with the operators on the public streaming APIs.


#9

Thanks for the quick response! Probably should’ve looked around a bit more before posting.