Collecting and displaying contextual tweets for cultural heritage records

This post outlines a really simple way to gather tweets that relate to cultural heritage objects/records and shows how displaying them on the record pages can add value for users. Whilst only covering Twitter it could be applied to many social media platforms.

It’s really quick and simple, using freely available tools to gather an archive of tweets and then to embed them on the record pages they relate to.

How to gather tweets that relate to objects and records

Gathering a permanent archive of tweets is important as Twitter’s search facility, both publicly and through their API, only displays about 7 days worth of results.

I currently use the TAGS Google Sheets based tool – – which takes minutes to set up and then automatically gathers tweets which mention collections records. Of course I could have hand-coded something using the Twitter API, but why bother when there are great tools like this?

The crucial bit is to define the url pattern to match on – for example for Imperial War Museums’ online collections that would be ‘’, as represented by this twitter search Here’s the full archive of >47,000 tweets gathered using that search since May 2016 – (my top discovery which meant all this was possible was working out that if you include the protocol – e.g. – twitter just looks for that exact url but if you take the https:// off as with the above link then it effectively does a wildcard search).

Anyway, you can see within these tweets that Twitter users, including the collections holder’s own Twitter account, post some really fascinating content about the objects. The insight into what is being shared and by who could be a research project in itself!

Embedding tweets on objects and records

I am currently using this process to embed contextual tweets on my First World War site, A Street Near You. I have a TAGS sheet set up to harvest any tweets that link to Commonwealth War Graves Commission records based on the search ‘’ (note that’s not even my website, but these are the most commonly shared links and through IDs I can tie these to my records). I automatically publish the tweet archive from Google Sheets as a csv ‘feed’ (just a couple of clicks to do this in the sheet) and then pull these into my database using a very simple script scheduled to run hourly (overkill!). I already had a table that holds user-submitted (crowdsourced) links so the tweet url gets inserted into there. All submitted links are moderated before being published, though to be honest the only ones I have ever not approved are because they are duplicates of existing tweets. You could also moderate the tweets within your TAGS archive in Google Sheets – lots of different way to handle this.

At the point of public display my page code fetches all published links that relate to that record. Typically it just displays the link with a text description but if they are urls to tweets then it embeds them using the standard Twitter embed code (to comply with their Ts&Cs).

Here’s a great example for Captain Albert Ball, VC, where it has user-contributed links to his Wikipedia page and a newspaper article, but also embeds and displays tweets that include a commemorative video, portraits, and a picture of his grave ––Ball

Potential issues

I guess many institutions could have issues with displaying third party content, but as tweets can’t be edited and you can include moderation in your workflow that really shouldn’t be a problem. The code changes required, though incredibly simple, could be more probematical, especially if you rely on commercial platforms and/or external developers.

We should also remember that tweets, or indeed whole accounts, can be deleted (for a multitude of reasons) and accounts can be made private and thereby hidden, at which point there will be technical issues around trying to display something that no longer exists, or if you archive the full tweet text then both legal and moral questions arise about keeping a copy. Recent examples like Twitter’s announcement that it plans to delete accounts that haven’t been used for 6 months (and presumably remove all their tweets) worry me, especially when you think of heritage based projects that have used Twitter to share information but have now effectively ceased and people moved to other roles.

But as long as you treat it as ephemeral information and make sure you handle the after effects should content disappear then I do think it can provide some real value to ends users by enhancing collections records.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.