Tuesday, December 24, 2013

#Twitter & #WordPress RSS in #Mediawiki (#Wikieducator) #vmvwiki #vmvdlt

Using RSS to put a Wordpress or Twitter feed into Mediawiki (wikieducator)


I must thank my friend & colleague Steph Day for working behind the scenes into finding Amit  Agarwal's connection between Twitter and MediaWiki via Google Drive Developer, and proving it could be done.


The RSS extension in MediaWiki allows you to feed from the WordPress RSS feed. Add the following to your MediaWiki page (but replace my WordPress blog with yours)


The following parameters are supported:

  • charset=… The charset used by the feed. iconv is used to convert this.

  • short Do not show the description text for each news item.

  • date Shows date/time stamp for each news item.

  • max=x Shows x most recent headlines.

  • highlight= term1 term2 The terms separated by a space are highlighted.

  • filter= term1 term2 Show only RSS items containing at least one of the terms.

  • filterout= term1 term2 Do not show any RSS items containing any terms

  • reverse Display the RSS items in reverse order

See complete article at http://www.mediawiki.org/wiki/Extension:RSS


This is much more complicated since  in 2013 Twitter changed the way it allowed developers to access the Twitter Stream. An RSS feed unfortunately is not available, instead a JSON file is generated. However, using a bit of "magic" by creating a Google App allows you to convert the JSON file into an RSS feed which can then be accessed in MediaWiki.


 from  Digital Inspiration created the bridging program that performs the magic and has generously shared the instructions at http://www.labnol.org/internet/twitter-rss-feeds/27931/

Examples of an RSS feed generated

  • Twitter Timeline of user @labnol https://script.google.com/macros/s/AKfycbz-_qbLKf5lAUBkPlCpVYgVPess6-NV1GRL6TNaz-6YNLbvUCs/exec?action=timeline&q=labnol

  • Twitter Favorites of user @labnol https://script.google.com/macros/s/AKfycbz-_qbLKf5lAUBkPlCpVYgVPess6-NV1GRL6TNaz-6YNLbvUCs/exec?action=favorites&q=labnol

  • Twitter List labnol/friends-in-india https://script.google.com/macros/s/AKfycbz-_qbLKf5lAUBkPlCpVYgVPess6-NV1GRL6TNaz-6YNLbvUCs/exec?action=list&q=labnol/friends-in-india

  • Twitter Search for New York https://script.google.com/macros/s/AKfycbz-_qbLKf5lAUBkPlCpVYgVPess6-NV1GRL6TNaz-6YNLbvUCs/exec?action=search&q=new+york

You should replace the value of 'q' parameter in the URLs as per requirement.

Following Amit's instructions I found one area that needed a little further explanation: For Step 2.  Configure your Google Script:

If you want to get a wrapper for your feed refer to the Sample page/instruction links at the start of this post.

Some Notes:

  • Don't expect the RSS Feed to show older Tweets particularly for Search. After activating the gApp you may need to add a Tweet for it to appear in the panel.

  • Twitter Search does not necessarily return all the relevant Tweets in the Search. So in my classes I have had a lot of students post with my #vmvwiki hashtag and they have not shown up in the panel.  Unfortunately this is what Twitter have done and in 2013 this killed the student use of Twitter as a viable communication tool for Social Media in the classroom.

.. now to see if I can create an RSS Feed for a Facebook Group :)


1 comment:

  1. Useful links Michael - thank you! How about putting a Follow widget on your blog? Would love to get an email when you post something new :)