Embedded Tweet frequently asked questions

A fully-rendered Tweet does not display on my page

An Embedded Tweet comes in two parts: a <blockquote> containing Tweet information and the JavaScript file on Twitter’s servers which converts the <blockquote> into a fully-rendered Tweet.

If you see Tweet text on your page but not a fully-rendered Tweet it’s possible your CMS or editing interface stripped the <script> needed to render the Tweet.

Try switching to a “text,” “HTML,” or “code editing” mode to directly input the pre-formatted Tweet information. Rich-text or WYSIWYG editors can misinterpret pasted HTML code, which may interfere with placing a Tweet on your page.

If you cannot reliably work with HTML in your articles then you or your website team should add the Twitter for Websites JavaScript to your webpage template to interpret any buttons or widgets on the page. Add the following code just before the closing </body> element in your website template:

<script id="twitter-wjs" type="text/javascript" async defer src="//platform.twitter.com/widgets.js"></script>

The JavaScript snippet above loads the Twitter widgets JavaScript if it is not already present on the page. The loaded JavaScript will convert Embedded Tweets, Embedded Timelines, Tweet Buttons, and Follow Buttons on your page into interactive widgets and buttons.

What happens when an author deletes his or her Tweet?

The Twitter widgets JavaScript will not display a fully-rendered Tweet if the Tweet no longer exists on Twitter. The fallback <blockquote> containing Tweet information will be visible on the page.

Will Embedded Tweets adapt to my responsive site?

An Embedded Tweet will adjust to the width of its containing element when inserted into a page. An Embedded Tweet requires a minimum width of 220 pixels and will fill up to 550 horizontal pixels.

How can I create an Embedded Tweet of a consistent height?

A basic Embedded Tweet includes Tweet text up to 140 characters in length, author information, a timestamp, and Tweet actions. An Embedded Tweet shows the previous Tweet in a conversation and photos, a video, or a link preview associated with the Tweet by default. Set conversation and cards parameters to false to limit Tweet display to just its basic formatting.

Page-level and individual widget custom link colors are added to the page through inline <style> blocks added by Twitter’s widget JavaScript. Websites restricting CSS insertion in a content security policy may also prevent a link color customization.

Sites with a twitter:widgets:csp meta element will not display a custom link color to avoid possible CSP warnings.