Need Help With Source Code for Follow Button Web Intent

followbutton

#1

I’m writing a series of 40 under 40 lists for Huffpo and want to include a follow button web intent similar to NASA’s in this link for 160 users. https://dev.twitter.com/web/follow-button/web-intent

Does anyone have a handy code template to modify for every user?

Thanks for your help, you’d save me a lot of time.


#2

The web intent link uses the @ handle or the ID of the referenced account.
https://twitter.com/intent/follow?screen_name=NASA

Add Twitter’s widgets JavaScript to the page if you would like managed child windows and events.
https://platform.twitter.com/widgets.js

Add a class token of twitter-follow-button to the anchor element if you would like to style the link as a follow-button. The follow button styling requires Twitter’s widgets JavaScript on the page.
<a class="twitter-follow-button">

Put it all together and you get a template:
<a class="twitter-follow-button" href="https://twitter.com/intent/follow?screen_name={username}">Tweets by @{username}</a>
<script async src="https://platform.twitter.com/widgets.js"></script>


#3

Niall, you rock!!! This worked excellent. Took a snip of web intent and
linked it to address. I and everyone who will be named on these lists owe
you a ton.

-Josue