Embedded TweetsÂ bring your pick of content from Twitter into your website articles. An embedded Tweet includes photos, video and cards media created for display on Twitter, and can even stream live video fromÂ Periscope. All aspects of Twitterâs display requirements are handled for you by using our tools; author attribution, Tweet actions, hashtags, mentions, and other key components of the Twitter experience.
Embed from Twitter.com
Every Tweet displayed on Twitter.com and in TweetDeck includes an embed code to easily copy-and-paste into your webpage. Activate the Tweet menu and select âEmbed Tweetâ to generate markup to include on your webpage:
Convert Tweet URLs using oEmbed
Programmatically convert a Tweet URL into embedded Tweet markup using theÂ oEmbed API. Make embedding a Tweet in your CMS or app as simple as pasting a Tweet URL.
OurÂ CMS best practices guideÂ describes common patterns for sites adding software support for embedded Tweets.
Customize Tweet display
Customize an embedded Tweet for your siteâs visual design and display preferences by including extra parameters in your embedded Tweet HTML.
Match your siteâs color scheme
An embedded Tweet supports light and dark color themes and custom link colors. Customize Twitter widgetsÂ at the page-level with <meta> elementsÂ or addÂ data-*Â attributes to individual generatedÂ <blockquote>Â elements.
View ourÂ embedded Tweet reference documentationÂ for a full list of embedded Tweet options.
Donât show previous Tweet in conversation thread
A Tweet may be in reply to another Tweet. By default, we include a summary of the previous Tweet in the conversation to provide context.
conversation = none
Set an oEmbed query parameter ofÂ hide_thread=trueÂ or add aÂ data-conversation="none"Â attribute to the resultingÂ <blockquote>Â element to prevent the display of a parent Tweet.
Hide photos, videos, and Cards
A Tweet may include a photo, video, or link to or other content supporting aÂ Card. By default, this media is displayed in embedded Tweets. You can hide this media if editorially desired.
cards = hidden
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.
If dynamically inserting new content into a page, pass the new document fragment toÂ twttr.widgets.load()Â to initialize embedded Tweet content.
To directly render an embedded Tweet at runtime use theÂ twttr.widgets.createTweet()Â function.