0

I am wondering if it is possible to filter users location and keywords

 double[][] location= location;
 String keywords[] = {"keywords"};

 FilterQuery fq = new FilterQuery();
 fq.locations(location);
 fq.track(keywords);
 twitterStream.filter(fq);

these code only seem to filter keywords..

Mike 'Pomax' Kamermans
  • 49,297
  • 16
  • 112
  • 153
user2158132
  • 5
  • 1
  • 3
  • please read the FAQ on how to ask a question. Your post starts with a question that can be answered yourself by just trying things out, so do so. Google and the APIs/tutorials for the packages you use would be a good start. – Mike 'Pomax' Kamermans Mar 21 '13 at 15:03

1 Answers1

0

Bounding boxes for locations are logical ORs. A locations parameter may be combined with track parameters, but note that all terms are logically ORs, so the query string track=twitter&locations=-122.75,36.8,-121.75,37.8 would match any tweets containing the term Twitter (even non-geo tweets) OR coming from the San Francisco area.

Orbita
  • 169
  • 2
  • 9
  • is there any possibility to filter by language ? – S Gaber Aug 03 '13 at 02:21
  • 2
    Yes, before 1 month twitter developers decided to add that possibility in twitter API. So twitter4j also support it. just add following: `private String[] language = new String[]{"en"}; FilterQuery fq = new FilterQuery(); fq.track(keywords).lang(language); twitterStream.filter(fq);` – Orbita Aug 03 '13 at 08:00
  • which version of twitter4j is supporting that, i am using twitter4j 3.0.3 – S Gaber Aug 03 '13 at 20:31