<meta> and <link> elements in your pages page.
Widget settings specified in a <meta> may be overridden at the individual widget level. Order of precedence:
- web intent link query parameter
- widget attribute
- meta or link element
Turn off DOM scan for widgets and buttons
The X for Websites JavaScript scansdocument.body after initialization to locate buttons, widgets, and web intents for enhancement. Turn off this scan if X content is only loaded via JavaScript factory functions or if you prefer to directly call load on a smaller fragment of the page.
Canonical link
The Post button uses the canonical link relation of the page expressed in a<link> as the shared URL if the URL property is not set in the button markup.
Add a canonical link in the <head> section of your webpage.
Identify the X profile of the page
Populate thevia property of a Tweet button by linking to your X profile page with a me link relationship token.
Set a me link relationship in the <head> section of your webpage.
me relationship from an anchor element on your page, such as a Follow button.
Theme
Override the defaultlight theme preference for an embedded Post or an embedded Timeline.
Do not track parameter
You may choose whether X widgets on your site help to personalize content and suggestions for X users, including ads. You can opt out of having information from your website used for personalization by following the instructions below. Include the following snippet within the<meta> and <link> elements on your pages that include X for Websites widgets:
data-dnt parameter to be true, as shown in the example below:
Turn off functionality which may trigger Content Security Policy warnings
An embedded Tweet or embedded Timeline may display with restricted capabilities when a Content Security Policy restricts inline loading of X. Setcsp=on to turn off functionality which could display Content Security Policy warnings on your site.