Option to show or hide screen name in createFollowButton?


#1

Does twttr.widgets.createFollowButton take an option to show/hide the screen name, in the way that the standard follow button markup has data-show-screen-name?


#2

Yes, with showScreenName set to “false” as a string in the options object.

twttr.ready(function(t) {
  t.widgets.createFollowButton(
    'TwitterDev',
    document.getElementById('container'),
    {
      showScreenName: 'false'
    }
  );
});

#3

Ah, I was so close… I tried every variant of showScreenName I could think of with a bool, but not a plain string. The docs don’t mention that option at all. Thanks for your help!


#4