I have a problem in my code that says : can not convert from element type object to status. I tried all the solution that proposed previously but I could not find one that match my statement. Can you please help to configure the problem and get the solution please?
This is my code. It basically about getting tweets more than 100, and split it for data mining purpose.
List statuses = new ArrayList();
while (true) {
try {
int size = statuses.size();
Paging page = new Paging(pageno++, 100);
statuses.addAll(twitter.getUserTimeline(user, page));
if (statuses.size() == size)
break;
}
catch(TwitterException e) {
e.printStackTrace();
}
for(Status status2 : statuses){
status2.getText();
//System.out.println(status2.getCreatedAt());
String s = status2.getText();
String[] splitted = s.split(" ");
//System.out.println(s);
for(String str : splitted){
//System.out.println(str);
if(doesListContainWord(str)){
incrementKeyofWordInList(str);
}else{
if(doesWordCountAsAWord(str)){
addNewWordToList(str);
}
}