Erratic `since_id` behaviour

2008-11-04 Thread Aditya

I've not been able to find any documentation for this, and a quick
search of this group also revealed nothing (please feel free to point
me to any existing discussion that I might have missed).

The quick and dirty: Twitter doesn't like a `since_id` that is not a
part of the timeline it is being sent for.

The longer and cleaner: Try this - find the status ID of any tweet
(take one from my timeline [http://twitter.com/aditya], I'm pretty
sure you're not following me =P), and make a call to your
`friends_timeline` with this ID as the `since_id`. Twitter will ignore
it completely, and send you the last 20/200 tweets anyway.

Expected behaviour: The API should return tweets made after the
`since_id` supplied, regardless of whether that status belongs in that
timeline or not. A simple reason is a use case I hit time and time
again: My app stores the status ID of the last tweet fetched, and uses
it for the next call. If I unfollow anyone in between two fetches, and
his/her was the last tweet I received (a pretty common scenario),
Twitter API bonks and sends me tweets I already have.

What I propose will bring a uniformity to the API call - and maybe
will be easier on Twitter as well (depending on how their fetch-from-
the-database is set up).


Re: Erratic `since_id` behaviour

2008-11-04 Thread Alex Payne

Yes, the behavior you describe would be an improvement.  Please
request this change at:
http://code.google.com/p/twitter-api/issues/entry.  Thanks!

On Tue, Nov 4, 2008 at 10:19 AM, Aditya [EMAIL PROTECTED] wrote:

 I've not been able to find any documentation for this, and a quick
 search of this group also revealed nothing (please feel free to point
 me to any existing discussion that I might have missed).

 The quick and dirty: Twitter doesn't like a `since_id` that is not a
 part of the timeline it is being sent for.

 The longer and cleaner: Try this - find the status ID of any tweet
 (take one from my timeline [http://twitter.com/aditya], I'm pretty
 sure you're not following me =P), and make a call to your
 `friends_timeline` with this ID as the `since_id`. Twitter will ignore
 it completely, and send you the last 20/200 tweets anyway.

 Expected behaviour: The API should return tweets made after the
 `since_id` supplied, regardless of whether that status belongs in that
 timeline or not. A simple reason is a use case I hit time and time
 again: My app stores the status ID of the last tweet fetched, and uses
 it for the next call. If I unfollow anyone in between two fetches, and
 his/her was the last tweet I received (a pretty common scenario),
 Twitter API bonks and sends me tweets I already have.

 What I propose will bring a uniformity to the API call - and maybe
 will be easier on Twitter as well (depending on how their fetch-from-
 the-database is set up).




-- 
Alex Payne - API Lead, Twitter, Inc.
http://twitter.com/al3x