Parameter Reference
Parameters
A Follow button may be customized from its default settings by specifying parameter overrides.
Parameter | Description | Example |
---|---|---|
screen_name | The Twitter username to be followed. | Automatically extracted from the anchor element’s href attribute when using JavaScript-enhanced button markup. | TwitterDev |
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 Twitter 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://twitter.com/TwitterDev"
data-show-screen-name="false"
data-size="large"
>
Follow @TwitterDev
</a>
JavaScript example
twttr.widgets.createFollowButton(
"TwitterDev",
document.getElementById("container"),
{
showScreenName: "false",
size: "large"
}
);