Posted by & filed under iPad, iPhone, Mac.

When loading Tweetings after having used it already i.e. it’s not a new installation, then Tweetings tries to load all missing Tweets from the last tweet you saw.

Sometimes it’ll load all of them and sometimes you’ll see a gap. A gap means there are more Tweets than we can retrieve in a single call to the Twitter API. Tapping the gap goes off and loads some more, etc.

Now the Twitter API has a maximum number of tweets that you can call in a single api request. That number is 200.

Tweetings is only loading 100 though

In a recent update to both Tweetings for iPhone and Tweetings HD for iPad this number changed to 100 instead of 200, why is this.

Well Twitter are shortly going to wrap ALL url’s on Twitter with their own shortener called t.co (see http://support.twitter.com/entries/109623)

Now if we didn’t make the changes we have already, then when this is switched on by default you won’t easily be able to tell where a link leads, if a Tweet has an image in it, if it has TwitLonger content associated with it, etc.

Twitter have dealt with this through a system called entities. In short this is a system we can enable in the background that allows us to decode these t.co links for display purposes so we can still analyse these links for images, etc.

Why can’t you load 200 tweets though

We tried this in testing and 9 times out of 10 the first time you called your timelines Twitter would return an HTTP status code of 502. To you and me, this is the code for the Over Capacity / Fail Whale. Calling the timeline a second time would actually load it.

We asked Twitter about this and their response was

The count=200 limit was created when the timelines contained less information. As Twitter has grown and added more data to the timelines the amount of processing required has increased. What this means to developers is including all the retweets and entities takes too long when asking for 200 statuses at once and will result in a 502 error the first time the data is requested.

The current workaround is to request less than 200 per page and instead request more pages. Alternatively use one of the Streaming API methods to receive data and use the REST API for other interactions.

We are working to allow this amount of data to be returned in one request however it requires a longer term solution.

Updating the summary to better reflect the issue and marking as longterm

There you have it, straight from Twitter themselves. If you want us to be able to provide a stable client, but also be able to unwrap the t.co url shortener we had to make a tough decision to lower the default amount of Tweets you can call on refreshing a timeline.

You can turn this off in the settings. It’s called ‘Expand URLs’ but we really don’t recommend you do so.

What about the Tweets per Page setting

This setting is exactly what is says. It’s for loading Tweets on SUBSQUENT pages and is totally ignored for refreshing timelines. However this should also only have a maximum value of 100 and not 200 too if you don’t want to see lots of over capacity errors!

But I still get Over Capacity errors at 100 tweets

It’s likely that an entity is corrupt in your timeline and it’ll pass in time, or that Twitter timed out requesting those entities and by the time you refresh it’s been generated and will work.

However that being said there is absolutely nothing we as API developers can do about it, the error firmly lies with Twitter themselves, complain to them about forcing t.co on us

Can I turn this off?

Yes you can through the ‘Expand URLs’ setting in the app itself.  However if you do this no t.co link will be decoded… which means when Twitter turns this on for EVERY link, as is their plan to do so, you’ll no longer know what is an image link, twitlonger, etc and they’ll open in a web browser instead.

Leave a Reply

You must be logged in to post a comment.