Learning Technology

Adding a Twitter feed block to your Moodle module

June 19th, 2013 at 10:06

Twitter has recently turned off their API for RSS.  What this means is that if you’ve created a block in your Moodle module that display tweets, they will no longer work.  The current alternative is to use Twitter’s own widget.

The disadvantage is that it adds to the loading time of the page, and it is not as easily customisable so takes up a lot more space in your column.  Also it is a shame that Twitter have turned their backs on the universal standard of RSS feeds while other services still use them.

How to add a Twitter widget to Moodle

Step 1 – Twitter

  1. Log in to Twitter
  2. Click on the settings icon (the cog wheel next to the search box)
  3. Select ‘Settings’
  4. Select ‘Widgets’ from the left hand menu
  5. The first time, use ‘Create New’ to create a widget.�
    Once you have a widget, you can edit it in the same way, using the ‘edit’ button
  6. Choose the timeline source.�
    Usually this will be ‘User Timeline’ but it may be a search term (e.g., your course hashtag, such as #nooc13)
  7. Select options.�
    Usually you will want pictures expanded. You can also include or exclude replies.
  8. Set the height.�
    600 is the default, but still only shows around 3 tweets while taking up a large portion of your column. 350px may be a better bet – a scroll bar will be presented for the user.
  9. Leave the ‘Theme’ as ‘light’.
  10.  Click ‘Create Widget’
  11.  In the code box which then appears, select all the text, and copy it (using CTRL-C on your keyboard)
  12.  Open a text editor (such as Notepad in Windows) and paste the text into there

Step 2 – Moodle

  1. Log in to Moodle (you will need to be an editor or Editing teacher)
  2. Go to your module
  3. Click ‘Turn editing on’ at top right
  4. Scroll down to the bottom of the right-hand left-hand column to ‘Add a block’
  5. Select the drop down menu and choose the block:  ‘HTML’
  6. Wait for the screen to refresh and then scroll down to the bottom of the right-hand left-hand column again, where you will see (new HTML block)
  7. Click on the Edit/configure icon for that block
  8. Give it a title (e.g., My tweetstream)
  9. In the Content box click the HTML button ( to the right of the bottom row of editing icons that looks like <> in the bottom row of editing icons
  10.  Paste in the code text you saved above
  11.  Click ‘Update’
    You will not normally need to change any other settings
  12.  Click ‘Save changes’

Return to the home screen where you will see your tweets appear.

Now that you have a twitter widget defined, you can edit it in futur by logging back into Twitter, and going to settings->widgets to get to your list of widgets. Click the ‘edit’ button to edit it.  There is no need to change the Moodle side of things because the widget will update to reflect your changes. However the changes may take a few minutes to work their way through to your Moodle page.


Post a comment

You must be logged in to post a comment.

No comments for “ Adding a Twitter feed block to your Moodle module ”