Problems with twitter widget displaying timeline with two different parameters



I am trying to create a widget for a search feed that displays the tweets from a user with only a specific hashtag. I have tried creating it on the widget creator, but every time I do the feed comes up blank with a search tweets button. When I click on that, it shows tweets with the parameters I have made for the widget. So my problem is getting the widget to display those tweets. is there any way to alter the script that it generates to make it display the tweets?



An embedded search timeline displays recent Tweets: about 7 days worth. An equivalent search page may display additional Tweets.


Is there a way to modify the embed code to make it search for a certain amount of posts? What we are trying to use it for needs to show the last couple of any results that it can find. It would be a lot more useful if it could be changed so we can use it for different things. We basically want to use this for a status for different systems and show the last posted messaging about that system on whether it was down or up or having issues.

Tyler Brown


You may add a data-tweet-limit parameter to the anchor element limit the number of Tweets displayed to a specific number.
Example: data-tweet-limit="2"

The Tweet limit filters the result set normally returned by the embedded search timeline datasource. It is not an instruction to change the capabilities of the datasource to continue requesting Tweets over an extended time or other parameters.


So this widget can’t search further back like the regular search functionality? Why would that be limited?

Tyler Brown


The answer is that the Twitter Search API has always been limited to 7 days. Some time ago, the search function on the website was rebuilt on the full Twitter archive. There has been no work to do the same with the widget (and I’m not aware of any plans to do so)


Is there a way to program the widget to display anything in the last 7 days and then if there are no search results then it will show the last 7 days worth of posts on our page without a hashtag parameter?



No. You may limit to fewer Tweets than returned by the datasource but you may not change the parameters of the datasource.


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.