• Home
  • Random
  • Nearby
  • Log in
  • Settings
Donate Now If Wikipedia is useful to you, please give today.
  • About Wikipedia
  • Disclaimers
Wikipedia

Template:Twitter/sandbox

  • Template
  • Talk
  • Language
  • Watch
  • Edit
< Template:Twitter
This is the template sandbox page for Template:Twitter (diff).
See also the companion subpage for test cases.
Template documentation[view] [edit] [history] [purge]
For the template for embedding tweets in articles, see Template:Tweet. For the navbox, see Template:Twitter navbox.
See also: Template:Cite tweet and Wikipedia:External links/Perennial websites
WarningThis template is used on approximately 17,000 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them.
The external links guideline recommends avoiding ==External links== to Twitter. Only include links to social media if the subject is particularly known for using that social medium, and when the link provides the reader with significant unique content, and it is not easily linked from another link included in the article (i.e. if the individual's homepage is linked and that has a prominent link to a Twitter feed, delete the Twitter link here, see WP:ELMINOFFICIAL). Wikipedia is not a comprehensive directory of a subject's web presence. Only link to official accounts "controlled by the subject (organization or individual person) of the Wikipedia article". Legitimate Twitter accounts are usually named in reliable sources or linked to by other subject-controlled sources.
Redirects
  • {{Twitter.comTemplate:Twitter.com}}
  • {{Twitter userTemplate:Twitter user}}
  • {{Official Twitter pageTemplate:Official Twitter page}}
  • {{xsnTemplate:Xsn}}
This template tracks and uses Wikidata property:
  • X (Twitter) username (P2002) (see uses)
This template uses Lua:
  • Module:EditAtWikidata (sandbox)
  • Module:WikidataCheck (sandbox)

This template generates an external link to an account at Twitter. It is designed to standardize the text and formatting of links to the legitimate Twitter account profiles of persons or organizations with sufficient notability to be the subject of a Wikipedia article. However, adding a Twitter link is never mandatory and in certain cases should be discouraged.

Note that very many fake Twitter accounts have been created as hoaxes, parodies, or attempts by fans to mimic a celebrity's style convincingly. Please make a detailed effort to verify the authenticity of any external links you wish to include.

Legitimate Twitter accounts can be found through being named in reliable sources, such as in newspaper stories about the subject, or linked to by other subject-controlled sources, such as the subject's legitimate website. Since November 2022, a Twitter account having a verification badge no longer indicates any legitimacy, as it is now available to anyone with a Twitter Blue subscription.

Contents

  • 1 Usage summary
  • 2 Explanations and examples
    • 2.1 One parameter
    • 2.2 Two parameters
    • 2.3 No parameters and Wikidata property not defined
  • 3 TemplateData
  • 4 Tracking categories
  • 5 See also

Usage summary

edit
One parameter
{{Twitter | username }}
{{Twitter | id= username }}
Two parameters
{{Twitter | username | Displayed Name }}
{{Twitter | id= username | name= Displayed Name }}
Using Wikidata property
{{Twitter}}
{{Twitter | name= Displayed Name }}

Explanations and examples

edit

One parameter

edit

Fill this parameter with the ID string used in the URL for the user's account profile on Twitter. When one parameter is used, the link text is the title of the Wikipedia article where this template is used.

URL
https://x.com/Twitter
Usage
* {{Twitter | Twitter }}
* {{Twitter | id= Twitter }}
Output
  • Twitter/sandbox on Twitter
  • Twitter/sandbox on Twitter

Since "Twitter" is the name of the Wikipedia page you now are looking at, the link above appears as "Twitter on Twitter" on this Wikipedia page. The lead name will change according to the name of the Wikipedia page.

Two parameters

edit

The first parameter will be the ID string used in the URL at Twitter. The second parameter will be used as the link text.

URLs
https://x.com/AcadiaU
Usage
* {{Twitter | AcadiaU | Acadia University }}
* {{Twitter | id= AcadiaU | name= Acadia University }}
Output
  • Acadia University on Twitter
  • Acadia University on Twitter

No parameters and Wikidata property not defined

edit

When used without an "id" parameter, this template will call data from Wikidata, if available. If none is available, the category Category:Twitter template missing ID and not in Wikidata will be applied and an error message will be displayed.

Usage
* {{Twitter}}
Output
  • {{Twitter}} template missing ID and not present in Wikidata.

TemplateData

edit
This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Twitter in articles based on its TemplateData.

TemplateData for Twitter

This template generates an external link to an account at Twitter.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
IDid 1

The username in the Twitter URL, such as AcadiaU in https://x.com/AcadiaU. This parameter is optional if Wikidata property P2002 exists, but required if not.

Default
Wikidata property P2002
Example
AcadiaU
Stringoptional
Namename 2

The name displayed as the link text. This parameter is optional; it defaults to the Wikipedia article name, without disambiguation.

Default
{{PAGENAMEBASE}}
Example
Acadia University
Stringoptional

Tracking categories

edit
  • Category:Twitter username different from Wikidata (412) – comparison is case insensitive, so AcadiaU matches acadiau
  • Category:Twitter username not in Wikidata (383)
  • Category:Twitter template missing ID and not in Wikidata (4)
  • Category:Pages using Twitter with unknown parameters (0)

See also

edit
  • {{Cite Twitter profile}}, for use inside ref tags
  • {{Tweet}}
  • {{Cite tweet}}
  • Wikipedia:TWITTER
  • {{Facebook}}
  • {{Instagram}}
  • {{Pinterest}}
  • {{Tumblr}}
  • {{flickr-inline}}
  • {{flickr-inline2}}
The above documentation is transcluded from Template:Twitter/doc. (edit | history)
Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages.
Add categories to the /doc subpage. Subpages of this template.
Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:Twitter/sandbox&oldid=1246568762"
Last edited on 19 September 2024, at 19:07

Languages

      This page is not available in other languages.

      Wikipedia
      • Wikimedia Foundation
      • Powered by MediaWiki
      • This page was last edited on 19 September 2024, at 19:07 (UTC).
      • Content is available under CC BY-SA 4.0 unless otherwise noted.
      • Privacy policy
      • About Wikipedia
      • Disclaimers
      • Contact Wikipedia
      • Legal & safety contacts
      • Code of Conduct
      • Developers
      • Statistics
      • Cookie statement
      • Terms of Use
      • Desktop