Embedded Tweets

An Embedded Tweet brings brings the best content created on Twitter into your article or website. An Embedded Tweet may include unique photos or a video created for display on Twitter or interactive link previews to highlight additional content. Author attribution, hashtags, mentions, and other key components of the Twitter experience helps your site’s audience connect with the global conversation happening on Twitter.

This guide describes Embedded Tweets displayed within a web browser. Twitter also offers native Tweet displays on iOS and Android.

An Embedded Tweet combines HTML preview content with Twitter-hosted JavaScript to display a fully-rendered Tweet experience. Publishers may copy-and-paste Embedded Tweet markup generated on a Tweet detail page, pass a URL to a supporting CMS, or add a Tweet to the page using a JavaScript factory function.

Single Tweet

Every Tweet displayed on Twitter.com and in TweetDeck includes an Embedded Tweet markup generator to easily copy-and-paste Embedded Tweet markup and Twitter JavaScript into your webpage. Select the “More” Tweet action under the Tweet text and select “Embed Tweet” to generate HTML markup to include on your webpage:

Convert Tweet URLs using oEmbed

Programmatically convert a Tweet URL into Embedded Tweet markup using Twitter’s oEmbed API. Make embedding a Tweet in your CMS or app as simple as copy-and-pasting a Tweet URL.

A Tweet may include a link to a Twitter-hosted photo, Vine video, or other content supporting a Twitter Card preview. Twitter may replace a link with a more visual experience including inline photo display, an inline video player, or a link preview displayed alongside the Tweet.

Set an oEmbed query parameter of hide_media=true or add a data-cards="hidden" attribute to the resulting <blockquote> element to prevent expanded content display.

Hide previous Tweet in conversation thread

Default view

conversation = none

@WilliamShatner Good day, Captain. #ISS is in standard orbit and Commander Swanson has the conn. Hope you’re having a great weekend!

Render a Tweet with JavaScript

Developers dynamically inserting new content into a page which may possibly contain Embedded Tweet markup should pass the newly inserted page fragment to twttr.widgets.load() to initiate a new scan for Embedded Tweet content.

Developers may directly insert a rendered Embedded Tweet onto the page without a blockquote.twitter-tweet scan by passing Tweet, options, and a HTML element to twttr.widgets.createTweet().