Does anyone know why the following cursor does not change in the code below?
cursor = "-1" followerIds = [] while cursor != 0 do followers = Twitter.follower_ids("IDTOLOOKUP",{"cursor"=>cursor}) cursor = followers.next_cursor followerIds+= followers.ids sleep(2) end
After the first iteration, where cursor = -1, the next cursor from twitter api is assigned to it. However, when this is sent to the twitter API on subsequent iterations, I get the same answer as the first time .. with the same next_cursor.
Any ideas what I'm doing wrong? I use twitter stone.
source share