sferik/twitter — pull request #335 by nbraem (2012-12-20 13:56:14+00:00)
Title: Bug fix for iterating over friends or followers of someone else than the authenticated user

This code:

twitter.followers("sferik").each{}

Generates these requests:

get https://api.twitter.com/1.1/followers/list.json?cursor=-1&screen_name=sferik
get https://api.twitter.com/1.1/account/verify_credentials.json
get https://api.twitter.com/1.1/followers/list.json?screen_name=nbraem&cursor=1421602433033067513
...

As you can see, the first request correctly returns the followers of **sferik**, but the second request returns followers of the authenticated user **nbraem**.

This was not caught in the specs, because it's always authenticating as **sferik**, and requesting followers or friends of the same user **sferik**.