Documentation
Embed Tweets and lace Twitter functionality into your pages. This documentation summarises configuration options for each widget type.
Scriptable Interfaces and Advanced Configuration
You can use TFW widgets dynamically within pages and applications using site-wide configuration and JavaScript interfaces. You can also design your own Twitter interaction experiences using Web Intents
- Page Configuration for Widgets
- Loading and Initialization
- JavaScript Events and Callbacks
- Factory Functions
- Web Intents
REST APIs
Embedded Tweets can be integrated into publishing workflows and Content Management Systems using OEmbed.
Guidelines and Terms
Today, Twitter is updating embedded Tweets to enable a richer photo experience: https://t.co/XdXRudPXH5
— Twitter API (@twitterapi) September 26, 2013
Get Started: Create a Widget
To create an embedded Tweet, click the “••• More” menu on any Tweet, then paste the embed code into your editor.
Frequently Asked Questions
See the full Twitter for Websites FAQ, or find answers in the discussion forum.
Which languages are supported by embedded widgets?
Widgets are available in 28 of the languages supported by Twitter's website and clients. The language is determined automatically from the page a widget is embedded upon: That is, an HTML
lang
attribute on the embed code element or an ancestor determines the language of the widget chrome. Ideally, you should mark-up the language of your page on the<html>
element of your page, or the containing section where the language changes like so:
<html lang="fi"> … </html>
Or, on multilingual pages:
<html lang="fi"> … <section lang="fr"> … </section> … </html>You can override the language of individual widgets using the same attribute:
<a class="twitter-tweet-button" href="https://twitter.com/share" lang="de">Tweet</a>
The languages presently supported by the widgets are:
hi
,zh-cn
,fr
,zh-tw
,msa
,fil
,fi
,sv
,pl
,ja
,ko
,de
,it
,pt
,es
,ru
,id
,tr
,da
,no
,nl
,hu
,fa
,ar
,ur
,he
,th
.If an unsupported language variant is specified that isn't supported, the widget will be rendered in the matching parent language: For example
es-mx
will be rendered ases
. If a page's language code does not match any supported translation, US English is the default.Note that setting the language only affects the language of the widget, it does not translate the content of Tweets. Tweet text is always presented as originally authored.
You can help translate Twitter and Twitter for Websites widgets through the Translation Center.
Which browsers do Twitter for Websites widgets support?
Twitter for Websites widgets are tested and supported in most popular browsers. Browsers which are fully supported are:
- Chrome 4
- Firefox 4
- Safari 5
- Opera 10
- Internet Explorer 8
- Mobile Safari 5
- Android 4
Other, older browsers—such as Internet Explorer 7, Firefox 3, and Android 2.x—are partially supported, but not all features may be available in every environment. Our widgets are built in a progressively enhanced manner, such that browsers which do not support the required JavaScript features will still provide fallback functionality through hyperlinks and quoted text.