| Parameter | Description | Example |
|---|---|---|
screen_name | The X username to be followed. Automatically extracted from the anchor element’s href attribute when using JavaScript-enhanced button markup. | XDevelopers |
show_screen_name | Set to false to hide the username of the specified account. | false |
size | Set to large to display a larger button. | large |
lang | A supported X language code. | es |
dnt | When set to true, the button and its embedded page on your site are not used for purposes that include personalized suggestions and personalized ads. | true |
HTML example
<a class="twitter-follow-button"
href="https://x.com/XDevelopers"
data-show-screen-name="false"
data-size="large"
>
Follow @XDevelopers
</a>
JavaScript example
twttr.widgets.createFollowButton(
"XDevelopers",
document.getElementById("container"),
{
showScreenName: "false",
size: "large"
}
);