getting 6 month tweets from particular hashtag in twitter
using this code...i m getting only 7 days tweets from the #india...i want to get atleast six month tweets from the hashtag..
i m trying to get the tweets from particular hashtag and write it into the notepad....guide me to get atleast six month tweets from the hashtag india
FileWriter fw=null;
BufferedWriter bw=null;
fw=new FileWriter(
bw=new BufferedWriter(fw);
Configurati
cb.
.setOAuthCo
.setOAuthCo
.setOAuthAc
.
Twitter twitter = new TwitterFactory(
Query query = new Query("#india");
long lastID = Long.MAX_VALUE;
try {
QueryResult result = twitter.
tweets.
System.
for (Status t: tweets)
if(t.getId() < lastID)
lastID = t.getId();
query.
for (int i = 0; i < tweets.size(); i++) {
Status t = (Status) tweets.get(i);
String user = t.getUser(
String msg = t.getText();
Date date =t.getCreatedAt();
bw.write(
+user+"\t"+" wrote"+"\n"+"MSG - "+t.getText(
}
} catch (TwitterException te) {
}
Question information
- Language:
- English Edit question
- Status:
- Expired
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply: