I am working on a research project at the moment where I have about 210 or so tweets in my possession from six months ago. I am trying to retrieve all the real names from the users (I already have their screen names). The problem is that certain screen names that were valid six months ago appear to be invalid at this point in time and will return a 404 error. I have a TwitterException that catches this and then skips that user’s screen name in the list and continues on with my loop. This works perfectly except I am using the Twitter API for every individual call which I have found out I don’t want because of the RateLimit issues.
Now if I use the lookUpUsers method and put all of the results in a list I would be calling the API in only 2 calls or so right? If this is more efficient I want to do this but I don’t know how to go about error handling then. When I was handling tweets individually if I got a 404 error from one of them I could just handle it with an exception and use the keyword “continue” to keep going with my loop. But with this list of 100 screen names in an array per call I don’t know how to do that.
In addition, if I were to give lookUpUsers a number below 100 it would still work fine right?
Any suggestions or help would be greatly appreciated! I am also using Twitter4J…