articles

Home / DeveloperSection / Articles / Implement twitter follow plugin in your website

Implement twitter follow plugin in your website

Vijay Shukla 5603 18-May-2013

In this article I am trying to use twitter follow plugin in a HTML page.

The Follow Button is allows users to easily follow a Twitter account from any webpage. The Follow Button uses the same implementation model as the Tweet Button, and its integration is just as simple.

Code: -
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Twitter Follow Button</title>
    <script type="text/javascript">
        !function (d, s, id) {
            var js, fjs = d.getElementsByTagName(s)[0];
            if (!d.getElementById(id)) {
                js = d.createElement(s);
                js.id = id; js.src = "//platform.twitter.com/widgets.js";
                fjs.parentNode.insertBefore(js, fjs);
            }
        }
    (document, "script", "twitter-wjs");
    </script>
</head>
<body>
    <a href="https://twitter.com/_mindstick_" class="twitter-follow-button" data-show-count="true" data-lang="en">Follow @mindstick</a>
</body>
</html>
data-show-count: -

When it value is false then User's followers count is not displayed with the Follow Button, and if you can enable the display of this number using the data-show-count attribute

data-lang: -

Here we give the language of follow button; we use 'en' for English and if you want to use another language then follow below link.

 ·       http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes

Output: -

Implement twitter follow plugin in your website

 

 


Updated 07-Sep-2019

Leave Comment

Comments

Liked By