Laura Gibbs

Embedding Twitter Moments in Canvas

Blog Post created by Laura Gibbs on Feb 18, 2018

I haven't posted here in a while; my life has been really chaotic, but I discovered a strangely FREE bit of time this evening, and I wanted to write up something about Twitter Moments which I just started using this week. I've written a lot of posts here about how much I like using Twitter as a content source for my classes. I have a dedicated class Twitter stream, OnlineMythindia, which covers the topics of both my classes (Myth-Folklore and India), plus other items related to creativity, writing, and also campus events, etc. etc., and I consider this Twitter stream a really important part of my classes.


So, that all-purpose stream is great for including in my class announcements blog (which is also my Canvas Homepage: and, but for some of my other class-specific blogs, I want to filter out just the relevant tweets for those blogs (like the MythFolklore UnTextbook). The way I used to do that was by adding class-specific hashtags to the items I retweeted (like #OU4993 for India), but the wonderful ClassicRetweet extension stopped working a while ago, and it's been a lot of trouble to add those hashtags manually.


I was honestly getting kind of frustrating and not sure what to do when I read Alan Levine's post about Twitter Moments and realized I should give them a try.
Archiving Tweets: Are You Missing the Moment?


MOMENTS SOLVED MY PROBLEM (ALMOST) PERFECTLY. So, the way it now works is that I retweet everything/anything I want in my class account, and then I "save to moments" the items that ALSO go in one of these content-specific streams: Myth-Folklore, Indian Epics, and Growth-HEART-Writing), and I embed those moments in the relevant blog sidebars (they replace my old hashtag widgets).


Because......... YES, you can embed Twitter Moments! It's like any other kind of Twitter embedding: you go to Twitter, get the embed code, copy-and-paste that code into a vanilla HTML file, upload that to Canvas Files, and then iframe that Canvas File into a Canvas Page.


So, for example, here is my Growth-Heart-Writing Moment at Twitter.


screenshot of Twitter moment with embed code


Here is the embed code:

<a class="twitter-moment" href="">Growth-HEART-Writing</a> <script async src="" charset="utf-8"></script>


I put that into a vanilla HTML file called GrowthMoment.html, and uploaded that as a Canvas File here ( is a great way to create those little HTML files). I honestly never figured out after the javascript security discussion if this will, or will not, continue to work in the future; if javascript security shortcircuits this step, you can just publish the HTML file in your own webspace (or, heck, let me know and I will publish it in my space for you if Instructure leaves you out in the cold with no home for your nice javscript):
Exploring Growth Mindset 


Then I iframed that File into a Canvas Page:

Twitter Moment: Exploring Growth Mindset 


It works!


screenshot of Twitter moment in Canvas


Some things I have learned about Twitter Moments from playing around with them so far:


-- The hashtag stream was always live, with newest to oldest. With Twitter Moments, editing is required; when you edit, you can select "newest to oldest" OR "oldest to newest" based on what suits your needs (for me, it is all about newest to oldest)


-- A Moment has cover art up at the top, so my new routine is to update each Moment once a day, changing the cover art; that's an extra step I did not have to do before, but it's actually good for my curation awareness, so I don't mind


-- Moments are LONG and the embed code doesn't let you customize the height like you can do with (some) other Twitter widgets, like the hashtag widgets I used to use


-- Embedded media do not seem to play (???) in the Moment stream like they do in the regular Twitter stream, so it is not good for displaying YouTube videos (just a link to them), WordPress blog previews (again, just a link), etc.


That last item is a real drag for me, but so far, that is the only true problem (for my purposes) that I have run into. And since I am just using these Moments in my ancillary blog, not my main course announcements blog, that's okay.


Is anybody else using Moments? What tips can you share based on your experience...?


Jonathan Yoder of course I thought of you when I was writing this post as promised. :-)