PROCESSING + twitter4j; timeline
I want to show my timeline in my twitter account realtime.
this is my sourcecode. but I can't see anything in processing monitor. what's the problem?
Can someone help me with twitter4j?
Twitter twitter;
String username = "ID";
String password = "PASS";
String myTimeline;
int tlLength;
PFont fontA;
void setup(){
size(1200,800);
background(255);
smooth();
fontA = loadFont("arial-12.vlw");
textFont(fontA, 20);
textAlign(LEFT, CENTER);
noLoop();
noStroke();
}
void draw() {
twitter = new Twitter(username,password);
int myFriendsCount;
User[] friends;
try
{
java.util.List statuses = twitter.getUserTimeline();
Status status = (Status)statuses.get(0);
println(status.getUser().getName() + ":" + status.getText());
tlLength = status.getText().length();
myTimeline = new String(status.getText());
println(myTimeline);
}
catch( TwitterException e)
{
}
};