Problem (mostly) found!

The fact that the issues lies within my incorrect usage of the client
library I am using (twitter4j) and that my test case for using
something besides twitter4j was based on our broken twurl client AND
that both of these clients returned similar results missing the cursor
fields was enough of a confirmation for me in the wee hours last night.


Problem:
twitter4j provides a factory for obtaining a twitter client reference
that can accept OAuth credentials, and if you call the method to get
followers without specifying a twitter user id, it will pass the
credentials own user id in it's place. My most recent project required
me to retrieve followers of a user without that user's credentials and
I never refactored my code to explicitly pass the user id into the
method to get followers, but since my implementation expected
credentials, it utilized an account we fall back to which happens to
have less than a page size of followers. So when I was expecting the
followers of the twitter id I used in my test, I was actually getting
just the followers of our own development account.


Not knowing this error on my part, I went to twurl to compare my
findings and was convinced the API call itself when the results were
also missing the cursor fields. I did notice that the follower ids were
different that those returned in my unit test, but I attributed this to
the paging not being deterministic.


Solution:
I resolved my bug by simply using the available overload for the get
follower method that accepts the user id.


Yeah... it was that simple. I truly appreciate the support I received
here in this group and only wish that the other API I code against
whose site rhymes with Ace-book was even 50% as responsive and
helpful. ;-}

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk

Reply via email to