【发布时间】:2015-07-10 18:44:51
【问题描述】:
我正在尝试使用光标方法来收集用户/朋友的完整列表,而不是一遍又一遍地从我的用户那里收集相同的列表。请帮忙。感谢您的时间和精力:)
我的代码:
cursor = -1
followerIds = []
while cursor != 0 do
followers_user = user.followers("user", {:cursor => cursor})
cursor = followers_user.next_cursor
followerIds+= followers.ids
sleep(2)
end
我的回应:
#private method `next_cursor' called for #<Twitter::Cursor:0x007fd47482a208> (NoMethodError)
【问题讨论】:
标签: ruby-on-rails ruby twitter-bootstrap twitter pagination