so i built a program using the following example from
http://blog.blprnt.com/blog/blprnt/quick-tutorial-twitter-processing after importing twitter4j into my processing program:
so any thoughts on how i tweak the code so i can retrieve tweets only by specfic users? i'm a bit of a novice, learning as i go, so please bear with me. much thanks,
shields
Twitter myTwitter;
void setup() {
myTwitter = new Twitter("yourTwitterUserName", "yourTwitterPassword");
try {
Query query = new Query("sandwich");
query.setRpp(100);
QueryResult result = myTwitter.search(query);
ArrayList tweets = (ArrayList) result.getTweets();
for (int i = 0; i < tweets.size(); i++) {
Tweet t = (Tweet) tweets.get(i);
String user = t.getFromUser();
String msg = t.getText();
Date d = t.getCreatedAt();
println("Tweet by " + user + " at " + d + ": " + msg);
};
}
catch (TwitterException te) {
println("Couldn't connect: " + te);
};
};
void draw() {
};
so any thoughts on how i tweak the code so i can retrieve tweets only by specfic users? i'm a bit of a novice, learning as i go, so please bear with me. much thanks,
shields
1