Mr. Demetrius Michael
Mr. Demetrius Michael

Reputation: 2406

Ruby / Twitter Gem. Twitter::Error::NotFound

Happy holidays!

With the Twitter gem, I occasionally get this error when doing a lookup on a batch of ids. Is there a way to know which of the ids weren't found, and which were?

Upvotes: 0

Views: 455

Answers (2)

rwc9u
rwc9u

Reputation: 960

This occurs when either all of the ids you pass are not found or you only pass one id and it is not found. If at least one of the ids you pass is available then you will get back a list with that value and not any of the missing ones.

Upvotes: 1

Chris_Ch
Chris_Ch

Reputation: 7

Maybe you get this message as twitter cannot give back ids of private users, so this might help:
before asking for ids put this...

a_user = Twitter.user(screen_name)
if a_user.protected != true { ... }

Upvotes: 0

Related Questions