I am still seeing this issue. I am pasting some groovy code below, you
can run thus straight in groovyConsole with your own user/pass:

---
import twitter4j.*
import twitter4j.http.*

start()

@Grab(group='net.homeip.yusuke', module='twitter4j',
version='[2.0.10,)')
def start()
{
    def users = getUsers() //this never returns!
    println ("Total: ${user.size()} users.")
}


def getUsers(page = 1)
{
    def twitter = new Twitter('user', 'pass')
    def users = twitter.getFriendsStatuses(new Paging(page))
    println ("getUsers: got ${users.size()} users for page $
{page}...")

    if (users.size() > 90)
        return users + getUsers(page+1)
    else
        return users
}


The output I am getting this this:

oneeverbank-lm:scripts haiges$ groovy twitter_friends_status.groovy
getUsers: got 100 users for page 1...
getUsers: got 100 users for page 2...
getUsers: got 100 users for page 3...
getUsers: got 100 users for page 4...
getUsers: got 100 users for page 5...
getUsers: got 100 users for page 6...
getUsers: got 100 users for page 7...
getUsers: got 100 users for page 8...
getUsers: got 100 users for page 9...
getUsers: got 100 users for page 10...
...

So the recursion is never stopped as there are always 100 users
returned. I just have about 400 friends using this account, so
somethign seems wrong.

Could someone from Twitter please investigate this? It's a big issue
for my app as I am not able to cache the user information any more.

Thanx
Sven
On Dec 6, 8:25 pm, hansamann <sven.hai...@googlemail.com> wrote:
> Hi all,
>
> my code is calling api method statuses/friends with an increasing
> paging to get all friends information. Since a couple of hours it
> seems it never reaches a page with no friends or less than n friends
> so my code stops the recursion.
>
> Anyone similar problems?

Reply via email to