TimelineFilter shows "Timeline is Empty" when non-filtered tweets are older than one day



I have an application that is showing tweets from a TWTRListTimelineDataSource. I have the option for users to only show tweets from their “favorited” users so I am using .timelineFilter to get rid of all the handles that are not favorites.

Sometimes it shows “Timeline is empty” in the View Controller. Searching I see that it can show that if there are no tweets in the last 7 days but I know that most of the handles have tweeted in the last 7 days.

After some testing it seems that if my favorites don’t have a handle that has tweeted today the “Timeline is Empty.” But if I add someone that has tweeted today I will see their tweets plus the favorites that have tweeted the previous few days.


Additionally filter .timelineFilter takes out tweets that mention the filtered handles even if they are not replies.

Maybe there is a way to just show a timeline view with a specified set of handles instead?
Similar to UserTimeline but would take an Array of screenNames: TWTRUserTimelineDataSource(screenName: [String], apiClient:TWTRAPIClient)



So, I think the issue you describe in your first post is likely that, if your filter is very aggressive and filters out all of a timeline’s Tweets, Twitter Kit will treat that feed as empty. It will not continue to page through older requests if no Tweets match. You could limit the chance of this by increasing the number of Tweets in the response by setting maxItemsPerRequest to 50 or 100 (the default is 20).

For the second part: The filter behaviour is as designed: Filtering a handle will hide all mention of that user from the displayed timeline, not just replies or authorship. If you want to exclude replies and only need recent Tweets, you could refactor your app to use a search timeline with a query like this: list:@iAmBradDuns/my-fav-list exclude:replies, where that and other search operators can be used for that level of filtering.

Hope that helps,



Is maxItemsPerRequest a part of the iOS TwitterKit? I can’t find how to implement it in the Docs.

Maybe I am not using the SDK as intended then. I have an app for a TV show and one part of that is a twitter feed of the cast (around 30 people). That is a list that I have on the App’s Twitter account.
The app lets each user pick their favorite cast member so they can access them quicker in other parts of the app so I thought I could also make a segment in the twitter tab to just show their tweets.

So are you saying if I want to do that I need to set it up so they have to log into twitter and create a list in their twitter account?


Hi Brad,

When you create a TWTRListTimelineDataSource there is a property on it that you may set called maxTweetsPerRequest that will set the number of Tweets requested from the Twitter API in each request.


Thanks for the help. It must just be getting overloaded with too many handles in the filter.

If I have 2 favorites out of the 30 cast members it shows that the timeline is empty.
If I add one more favorite it shows 20 tweets and 4 of them are from the original 2 favorites.

But if I create a separate list with just those 3 handles and then filter out the 3rd favorite the 4 tweets show as expected.

In both cases they are not mentioning each other, so I don’t think that is part of it.

For now I think I just can’t offer that option to filter.


Sounds good. Thanks for the update.