Embed Tweet code doesn't work

embeddedtweet

#1

Hi,

Embed Tweet code doesn’t work properly - it doesn’t format tweets and shows error in console:

Just copied “Embed Tweet” code and pasted it into blank html doc:

<html>
    <head></head>
    <body>
        <blockquote class="twitter-tweet" data-lang="en"><p lang="en" dir="ltr">City of Flight<br><br>The <a href="https://twitter.com/Jumpman23?ref_src=twsrc%5Etfw">@Jumpman23</a> Air Jordan 1 High<br><br>Shop Men&#39;s &amp; GS 🇺🇸 <a href="https://t.co/YSb1aTton9">https://t.co/YSb1aTton9</a> <a href="https://t.co/mLs8OIHeE0">pic.twitter.com/mLs8OIHeE0</a></p>&mdash; Nike.com (@nikestore) <a href="https://twitter.com/nikestore/status/951102824628310016?ref_src=twsrc%5Etfw">January 10, 2018</a></blockquote>
        <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
    </body>
</html>

Tested on both Chrome v63 and Firefox v57


Embedded tweets no longer show up in an empty iframe
#2

We’ve run into the same problem, we are embedding tweets into html content on iOS and Android and it stopped working.


#3

Hi @oleg_gliznutsa and @remeja,

Thanks for reporting this problem!

We deployed a new version of widgets.js earlier today that should resolve these problems. Can you please test again and let me know if you’re still running into issues with widget rendering?


#4

I confirm that it’s working now. Thanks for quick fix.


#5

Hi @evansobkowicz,

Now widget is rendered properly, but there is still error in console:
Uncaught (in promise) Error: Unsupported


#6

@oleg_gliznutsa Thanks for pointing that out. I’ll take another look.


#7

Unfortunately the new widget.js isn’t working on our Android app anymore (watson.ch, a news site from Switzerland). We have a lazyloading implemented and use twttr.widgets.load() when the tweet is visible.

It works perfectly on desktop, iOS and Android Chrome, just not in our in-app-browser on Android. And twttr.widgets.load() doesn’t return anything. Do you have any clue where the mistake is?

example article: https://www.watson.ch/Digital/Twitter/531665406-Das-sind-die-10-beliebtesten-Tweets-des-Jahres-–-Obama-ist-gleich-3-Mal-dabei

Thanks in advance.

Michael


#8

It seems not to be working with Tumblr as well… I had an embed on this Tumblr blog that was working fine until very recently, probably around the time the script was updated. It’s not currently working though.

The error I’m seeing in console is

Public-Key-Pins: The certificate used by the site was not issued by a certificate in the default root certificate store. To prevent accidental breakage, the specified header was ignored.

I can’t tell offhand if that’s why the embed is failing or if it’s an unrelated error… or if the embed is failing because of something Tumblr changed rather than something Twitter changed.

Thanks!


#9

@mschaufi Can you check to see if you’re getting any JS errors logged to the console?


#10

@datafaucet This page doesn’t seem to include Twitter’s widgets.js. Can you make sure it’s included and then let me know if you’re still having trouble?


#11

Yeah, when I edit the source, I’ve still got this below the blockquote for the tweet:

<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

But Tumblr seems to be scrubbing that script tag out of the page after the fact. ::siiiigh::


#12

I added the script tag to the bottom of the theme for the blog and now it works… so Tumblr seems to be scrubbing it out of the blog entry, but not from my theme HTML, which is weird because a couple weeks ago Tumblr wasn’t doing that. In any event, I have a workaround. Thanks for having a look! :slight_smile:


#13

@datafaucet I’m glad it’s working now!


#14

It is working again. Did you change anything?

Anyhow, thanks for the support.


#15

@mschaufi We did deploy some changes on Monday, including a bug fix that may have been related to your issue. Glad it’s working!


#16