Twitter for Websites

Updated on Tue, 2014-05-06 10:27

Twitter for Websites is a suite of embeddable widgets and client-side scripting tools to integrate Twitter and display Tweets in your site or web app. You can find documentation for publishers and developers here, refer to the Twitter for Websites FAQ, or ask questions or share what you build in the discussion forum.

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

REST APIs

Embedded Tweets can be integrated into publishing workflows and Content Management Systems using OEmbed.

Guidelines and Terms

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.

Embed a Tweet via the ‘More’ menu.

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:

  1. <html lang="fi">
  2.     <section lang="fr"> … </section>
  3. </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 as es. 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.