I need to retrieve top two tweets from a list of twitter user account in a set interval and it must auto refresh every 1 min and fetch me the top two feeds.
Why must it auto refresh every one minute? If you want nearly real-time data, you should use the Streaming API’s statuses/filter with the follow parameter. https://dev.twitter.com/docs/streaming-api/methods#follow
You’ll then have access to all of their tweets as they happen and you can poll your own store of tweets for the most recent two.
@episod, ‘you can poll your own store of tweets’ interests me. I read the Developer Rules of the Road, and 4.A.ii states:
You may export or extract non-programmatic, GUI-driven Twitter Content as a PDF or spreadsheet by using “save as” or similar functionality. Exporting Twitter Content to a datastore as a service or other cloud based service, however, is not permitted.
I’d interpreted the second sentence of that as meaning that it’s against the RotR to store tweet content in our own data store (where ‘tweet content’ includes the ‘text’ key of a JSON response from the API) if we’re intending to show it later; we can just store IDs, and have to link to twitter.com to display the tweets. Is that interpretation correct?