Template:Tweet/doc

From Rest of What I Know
Example Twitter logo, a stylized blue bird
@example

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc dignissim, dolor vitae ullamcorper aliquet, velit mi sagittis metus.

12 Jul 2017[1]

Example X logo, a stylized letter X
@example

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc dignissim, dolor vitae ullamcorper aliquet, velit mi sagittis metus.

24 Jul 2023[1]

This template allows easy quoting within articles of tweets from Twitter, and posts from X, as Twitter has been known since 23 July 2023. A citation is automatically generated using {{cite tweet}}. It is more appropriate to use this template than a screenshot of a tweet or post, because the text it contains will be accessible to screen readers.

It is an alternative to standard quotation templates because it displays metadata related to the tweet (date of posting, user's name, user's handle, etc.). For quote tweets, use {{quote tweet}}; alternatively, simply pass the quoted tweet, as a second Tweet template, to the |reference= parameter in this template.

Usage[edit]

Full blank syntax[edit]

{{Tweet
| name = 
| username = 
| replyto = 
| lang = 
| text = 
| translation = 
| date = 
| ID = 
| reference = 
| archive-url = 
| archive-date = 
| url-status = 
| image = 
| block = 
| left = 
| width = 
| style =
}}

Parameters[edit]

  • |name= user's name as it appears at the top of the tweet
  • |username= user's @ handle (without the @)
  • |replyto= optional: username tweet is replying to
  • |lang= optional: language code of the tweet if non-English
  • |text= content of the tweet
  • |translation= optional: English translation of tweet if original tweet non-English
  • |date= required: date of the tweet formatted according to MOS:DATE; should be used with tweets posted before November 4, 2010. If the date is after 23 July 2023 the template will mark it as an X post.
  • |ID= number at the end of the tweet URL
  • |reference= optional: the template automatically creates a reference, but one can be provided to use instead. See second example.
  • |archive-url= optional: URL of an archived copy of the tweet. Ignored if |reference= is used.
  • |archive-date= optional: date of the archived copy. Ignored if |reference= is used.
  • |url-status= optional: if set to 'live', the title displays as the live link; if set to 'dead', the title displays as the archive link. Ignored if |reference= is used.
  • |image= optional: image or logo associated with Twitter account
  • |block= optional: any value displays tweet as block with 500px width as default (text above and below, doesn't flow around).
  • |left= optional: any value makes tweet aligned left
  • |width= optional: custom tweet width, default is 220px
  • |style= optional: custom style

Examples[edit]

Tweets in English[edit]

{{Tweet
| name = NASA
| username = NASA
| replyto = WilliamShatner
| text = @WilliamShatner Good day, Captain. #ISS is in standard orbit and Commander Swanson has the conn. Hope you're having a great weekend!
| date = Aug 2, 2014
| ID = 495719809695621121
| image = NASA logo.svg
| left = yes
}}
NASA Twitter logo, a stylized blue bird
@NASA

Replying to @WilliamShatner

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

Aug 2, 2014[1]

Tweets in another language[edit]

It is possible to include tweets written in another language other than English by adding the language parameter and including the List of ISO 639-1 codes of the language.

{{Tweet
| name = Wikipédia em português
| username = wikipt
| text = Você sabia que... ...são necessárias de 1300 a 2000 azeitonas para produzir apenas 250 mililitros de azeite? Leia mais na Wikipédia: https://pt.wikipedia.org/wiki/Azeite
| date = 8 February 2022
| ID = 1491109619363729410
| image = Wikipedia-logo-v2-pt.svg
| left = yes
| width= 240px
| language = pt
}}
Wikipédia em português Twitter logo, a stylized blue bird
@wikipt

Portuguese: Você sabia que... ...são necessárias de 1300 a 2000 azeitonas para produzir apenas 250 mililitros de azeite? Leia mais na Wikipédia: https://pt.wikipedia.org/wiki/Azeite

8 February 2022[2]

It's also possible to translate the tweet.

{{Tweet
| name = Wikipédia em português
| username = wikipt
| text = Você sabia que... ...são necessárias de 1300 a 2000 azeitonas para produzir apenas 250 mililitros de azeite? Leia mais na Wikipédia: https://pt.wikipedia.org/wiki/Azeite
| translation = Did you know... that it is necessary to have 1300 to 2000 olives to produce only 250 mililiters of olive oil? Read more about it on Wikipedia: https://pt.wikipedia.org/wiki/Azeite
| date = 8 February 2022
| ID = 1491109619363729410
| image = Wikipedia-logo-v2-pt.svg
| left = yes
| width= 240px
| language = pt
}}
Wikipédia em português Twitter logo, a stylized blue bird
@wikipt

Portuguese: Você sabia que... ...são necessárias de 1300 a 2000 azeitonas para produzir apenas 250 mililitros de azeite? Leia mais na Wikipédia: https://pt.wikipedia.org/wiki/Azeite


Did you know... that it is necessary to have 1300 to 2000 olives to produce only 250 mililiters of olive oil? Read more about it on Wikipedia: https://pt.wikipedia.org/wiki/Azeite

8 February 2022[2]

X posts[edit]

Any post with a date after the name of the platform was changed to X (23 July 2023), will automatically change the logo/link at the top left to be that of X.

{{Tweet
| name = EPA Land
| username = EPAland
| text = We're excited to have the U.S. Agency for International Development teaming up with us for global action against food waste as we renew our formal interagency commitment between @EPA, @USDA,  @US_FDA, and now @USAID! 🌎 💚
 
{{hash}}NoWastedFood
| date = May 30, 2024
| ID = 1796245706434367707
| image = Seal of the United States Environmental Protection Agency.svg
| left = yes
}}
EPA Land X logo, a stylized letter X
@EPAland

We're excited to have the U.S. Agency for International Development teaming up with us for global action against food waste as we renew our formal interagency commitment between @EPA, @USDA, @US_FDA, and now @USAID! 🌎 💚

#NoWastedFood

May 30, 2024[3]

Additional tweets by the same author require ref-name[edit]

{{Tweet
| name = NASA
| username = NASA
| date = Aug 15, 2024
| text = Our @NASAPersevere rover is about to start the next stage of its Mars mission—a monthslong climb up the western rim of Jezero Crater: https://go.nasa.gov/4dJSylR
| ID = 1824159896255816168
| image = NASA logo.svg
| left = yes
| ref-name = TweetNASA_2
}}
NASA X logo, a stylized letter X
@NASA

Our @NASAPersevere rover is about to start the next stage of its Mars mission—a monthslong climb up the western rim of Jezero Crater: https://go.nasa.gov/4dJSylR

Aug 15, 2024[4]

TemplateData[edit]

<templatedata> { "params": { "block": { "label": "block", "description": "Any value displays tweet as block (text above and below, doesn't flow around). Overrides left parameter", "type": "string" }, "width": { "label": "width", "description": "Custom tweet width", "example": "300px", "type": "string" }, "left": { "label": "left", "description": "Any value makes tweet aligned left", "type": "string" }, "name": { "label": "name", "description": "User's name as it appears at the top of the tweet", "type": "string", "required": true }, "username": { "label": "username", "description": "User's Twitter handle. Do not include the @ symbol.", "required": true }, "date": { "label": "date", "description": "Date of the tweet formatted according to MOS:DATE", "type": "date", "required": true }, "text": { "label": "text", "description": "Content of the tweet", "type": "string", "required": true }, "ID": { "aliases": [ "id" ], "label": "ID", "description": "The number at the end of the tweet URL", "type": "number", "suggested": true }, "reference": { "label": "reference", "description": "A custom reference can be provided to use instead of the automatically generated one", "example": "[5]", "aliases": [ "ref" ], "type": "string" }, "image": { "label": "image", "description": "Image or logo associated with twitter account", "type": "wiki-file-name" }, "replyto": { "label": "replyto", "description": "Username the tweet is replying to", "type": "string" }, "lang": { "label": "lang", "description": "language code of original tweet", "example": "de", "type": "string", "aliases": [ "language" ] }, "translation": { "label": "translation", "description": "English translation of the tweet" }, "nocategory": {}, "archive-url": {}, "archive-date": {}, "url-status": {}, "style": {}, "ref-name": { "label": "Named reference id", "description": "Overrides the autogenerated named reference ID. This is useful for fixing errors caused by two tweets by the same author", "example": "TweetUsername_2", "type": "string", "default": "Tweet{{{username}}}" } }, "description": "This template allows relevant tweets to be easily quoted within articles, with a citation automatically generated using the template, \"cite tweet\".\n\nUsing this template is better than a screen-shot of a tweet because the text is accessible to screen readers.\n\nIt is an alternative to standard quotation templates because it displays all relevant information about the tweet (date of posting, user's name, user's handle, etc) in a way that reflects Twitter's design language. For quote tweets use Template:Quote tweet.", "format": "block" } </templatedata>

See also[edit]

References[edit]

  1. NASA [@NASA] (Aug 2, 2014). "@WilliamShatner Good day, Captain. #ISS is in standard orbit and Commander Swanson has the conn. Hope you're having a great weekend!" (Tweet) – via Twitter.
  2. 2.0 2.1 Wikipédia em português [@wikipt] (8 February 2022). "Você sabia que... ...são necessárias de 1300 a 2000 azeitonas para produzir apenas 250 mililitros de azeite? Leia mais na Wikipédia: https://pt.wikipedia.org/wiki/Azeite" (Tweet) – via Twitter.
  3. EPA Land [@EPAland] (May 30, 2024). "We're excited to have the U.S. Agency for International Development teaming up with us for global action against food waste as we renew our formal interagency commitment between @EPA, @USDA, @US_FDA, and now @USAID! 🌎 💚 #NoWastedFood" (Tweet) – via Twitter.
  4. NASA [@NASA] (Aug 15, 2024). "Our @NASAPersevere rover is about to start the next stage of its Mars mission—a monthslong climb up the western rim of Jezero Crater: https://go.nasa.gov/4dJSylR" (Tweet) – via Twitter.
  5. custom reference