Embed a Twitter Feed into Moodle

In a recent #NT2tEU Twitter chat someone posed the question about how you link Twitter and Moodle together. There were suggestions about using your Twitter account to post messages about upcoming events and assignments in Moodle, linking back to them with the URL.

The way I tend to use Twitter and Moodle together is the other way round. I let Moodle take care of sending out the emails it needs for notifications, and I use Twitter as a way of pulling interesting feeds of information back into my Moodle courses.

To do this we are going to set up a Twitter Widget and then embed this code into a HTML block on our Moodle course page

Step 1 – Set Up Twitter Widget

  1. Log into your Twitter account
  2. Click your user profile picture and from the menu select “Settingstwitter1
  3. In the Settings page, select “Widgetstwitter2
  4. Now click the “Create new” buttontwitter3
  5. In this screen you can now choose what you want to display in this widget. You can choose from:
    1. User timeline – the tweets from an individual user (including yourself!)
    2. Likes – Tweets which have been liked by an individual user
    3. List – Tweets from lists which you own or have subscribed to
    4. Search – Tweets which are returned from any search terms
    5. Collection – Tweets from a collection which you have created on TweetDeck
  6. I am going to look at using the “Search” option here. This screen grab shows a search of the Picademy hashtagtwitter4
  7. Once you are happy with your preview, click the “Create widget” button
  8. You will then be presented with a small window with some HTML code in it. Copy all of the code in this window – We will use this in the next section!twitter5
  9. Close the pop up telling you that it might take some time to update the settings and now click “<– Back to widget settings” in the top right to return to the widget settings page.

Step 2 – Create our HTML Block in Moodle

  1. Log into Moodle and navigate into your course you want to create your HTML block in
  2. Turn course editing on through the “Course Administration” menu
  3. From the “Add a block” drop down menu select “HTMLmoodle1
  4. Now click the cogs icon for the “(NEW HTML BLOCK)” and select “Configure (new HTML Block) blockmoodle2
  5. You can now give the block a title. I am going to call this “#Picademy Tweets
  6. In the content section click the “< >” button to switch to the HTML mode editor and then paste the code from Twitter into the editormoodle3
  7. Click “Save changes” to save your block and return to your course page
  8. Click “Turn editing off” to view your embedded Twitter stream on your course page!moodle4

Leave a Reply

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