4

I'm using Twitter4J API for my application. I want to get all the statuses I had on my Twitter account (or if not all, most of them). Is this possible? Currently I am using getUserTimeline() but this only retrieves the last 20...

Thanks a lot and regards,

Krt_Malta

Krt_Malta
  • 9,265
  • 18
  • 53
  • 91
  • Is it at most 200? I tried for more tweets, but it is stricted to 200... On Twitter API, it said at most you can get 3200 tweets. But how? –  Oct 11 '11 at 07:22

3 Answers3

11
// retrieves the first page's 200 tweets
getUserTimeline(new Paging(1, 200));
Krt_Malta
  • 9,265
  • 18
  • 53
  • 91
  • 1
    How to load Paging function? what is the library to import. I want 500 tweets from a person. so i need to iterate atleast 3 papes on his time line. how to do that @Krt_Malta – areddy Nov 07 '15 at 11:44
1

Twitter doesn't allow searching for all the tweets (they are expired), so you'll only be able to query as far back as Twitter allows.

From Twitter

We also restrict the size of the search index by placing a date limit on the updates we allow you to search. This limit is currently around 1.5 weeks but is dynamic and subject to shrink as the number of tweets per day continues to grow.

Andy
  • 17,423
  • 9
  • 52
  • 69
  • Ok it seems not possible to get all the tweets you ever had however Paging seems to get more statuses than 20 – Krt_Malta Mar 17 '10 at 11:02
0

A similar question has been asked and answered here.

Get tweets of a public twitter profile

I would suggest that this question is closed.

Community
  • 1
  • 1
Anirudh
  • 453
  • 2
  • 5
  • 18