Follow Button Parameter Reference

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
show_count Set to false to hide the number of accounts following 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-show-count="false"
  data-size="large"
>
Follow @TwitterDev
</a>

JavaScript example

twttr.widgets.createFollowButton(
  "TwitterDev",
  document.getElementById("container"),
  {
    showScreenName: "false",
    showCount: false,
    size: "large"
  }
);

iframe example

<iframe
  src="https://platform.twitter.com/widgets/follow_button.html?screen_name=TwitterDev&show_screen_name=false&show_count=false&size=l"
  title="Follow TwitterDev on Twitter"
  width="80"
  height="30"
  style="border: 0; overflow: hidden;"
  ></iframe>