One service at a time
The X button and the text it posts
X is one of the services that takes words as well as a link, so the compose window opens with the page’s title already in it and the address after that. Nothing is shortened or trimmed on our side: the title goes across whole and X decides what fits.
The code
<div class="ats_kit ats_kit_size_32"> <a class="ats_btn_x" data-label="Post"></a> </div>
The text is the title
There is no separate option for the message, here or anywhere: on X the words are a parameter beside the link, while on WhatsApp and Bluesky the link is baked into the same field as the text. An option promising to set the message would print the URL twice on four services. The title is the message, and data-title is how one kit changes it.
https://x.com/intent/tweet?url={url}&text={title}A page with no title at all
The title falls back from data-title to og:title to the document title, and only a page with none of the three ends up empty. When it does, the empty parameter is stripped out of the address rather than sent as text=, and the compose window opens with the link alone — an empty first line in somebody’s draft is worse than no line.
A via handle, or a different intent
Add one by replacing the endpoint for this one service. The slots are the same, the rest of the row is untouched, and a template with a scheme we do not open is ignored in favour of the built-in one — so a typo costs you the handle, never the button.
window.ats_config = {
share_url: { x: 'https://x.com/intent/post?url={url}&text={title}&via=addtosite' }
};Live demo
One X button. Press it and read the compose window: the text is this page’s og:title and the link is its canonical address.
Services (1 selected)
No service matches “”.
Button size
Shape
Circle is available when service names are off.
Behaviour
<div class="ats_kit ats_kit_size_32"> <a class="ats_btn_x" data-label="Post"></a> </div> <script async src="//static.addtosite.com/widget.js"></script>
Related
More in One service at a time