Hi, everyone. Apologies for dragging Donald Trump into Canvas, but here's what I'm dealing with....
If I go to a news website, embedded tweets usually look like this (which I like):
But when I try to embed just that one tweet into a Canvas page I get this (which I do not like):
How do I get the embed to look like the news site rather than what I have above?
The method I'm using to embed the tweet is: alt+F9 > Insert > Media > embed, and then I insert the embed code provided by Twitter. I get the same results when pasting the embed code into Canvas's HTML editor. The embed code is this:
<blockquote class="twitter-tweet" data-lang="en"><p lang="en" dir="ltr">Wow, CNN had to retract big story on "Russia," with 3 employees forced to resign. What about all the other phony stories they do? FAKE NEWS!</p>— Donald J. Trump (@realDonaldTrump) <a href="https://twitter.com/realDonaldTrump/status/879648931172556802">June 27, 2017</a></blockquote>
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
For what it's worth, here is the url directly to Donald's tweet: https://twitter.com/realDonaldTrump/status/879648931172556802
Thanks for any help, Canvas Friends.
Solved! Go to Solution.
Ha ha ha, it's true.
I could talk about the teaching uses of Twitter all day, though.
I used your McCoy meme in the profile pages discussion btw. THANK YOU!!! 🙂
Hi bradhorn I was just following the instructions that I mentioned in the earlier comment:
The only difference is that instead of these steps:
3. Click Widgets.
4. Create New: Search
You could go to the tweet you want to embed and click the down arrow to get the code to embed tweet:
You then paste in that code into a text file that you upload as a File in Canvas, and then you iframe that File in a Page (or in a Discussion or wherever) per the instructions.
Here's what the code for that tweet looks like: as you can see, it contains a <script> HTML tag, which the Canvas Page editor will strip, but it will be safe as a file:
<blockquote class="twitter-tweet" data-lang="en"><p lang="en" dir="ltr">Those three words you've been waiting to hear:<br><br>EDWARD GOREY CHRISTMAS! <a href="https://t.co/oCsnHqbe29">pic.twitter.com/oCsnHqbe29</a></p>— Undine (@HorribleSanity) <a href="https://twitter.com/HorribleSanity/status/943192147351633920?ref_src=twsrc%5Etfw">December 19, 2017</a></blockquote>
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
This is highly similar to my feature ideahttps://community.canvaslms.com/ideas/9600 (Please upvote), where I wanted to embed a twitter timeline for APA style:
But, the "custom" HTML code wouldn't work on Canvas... 😞
By the way, I generated this code using publish.twitter.com, which is a very user-friendly way to get the code to embed a single tweet. 🙂
If you publish the script to a File, and THEN iframe that File in a Page, it should work.
That is the technique I use anyway.