2
我想使用遊標方法來收集用戶/朋友的完整列表,而不是從我的用戶反覆同一個。請幫忙。感謝您的時間和精力:)試圖讓Twitter的光標與API工作
我的代碼:
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)
,這不是真正的男人,你得到像280..and你會除非你知道如何使用遊標方法,否則一遍又一遍地得到相同的結果。 :\ – marriedjane875
這個問題不會發生在我身上。 – infused
所以當你跟twitter的API,你的用戶沒有請求超時? @infused – marriedjane875