Twitter tips: Displaying a badge that shows total followers

If you have a successful Twitter account that’s amassed a sizable following, you might feel like bragging about it. I don’t mean that you should cover the top of your page with a massive banner that shouts out your total follower ship. Please don’t do that. I’m talking here about something a lot more subtle: a Twitter badge that not only points to your Twitter home page, but also includes a regularly updated count of your followers.

twitter tips,twitter tricks,twitter tips and tricks,twitter latest updates,facebook tips and tricks,facebook tricks

The code wizards at TwitterCounter (whom you meet again in Chapter 9) offer just such a badge, and adding it to your Web site is a relatively straightforward matter of copying and pasting some code. First, use your Web browser to navigate to the following address, where your name is your Twitter username:

"http://twittercounter.com/pages/buttons/yourname"

TwitterCounter displays a page that includes four button styles, as shown in figure 7.2.

Below each button style you see a text box that includes some HTML code. Here’s an example:

<script type=”text/javascript” language=”javascript” 
src=”http://twittercounter.com/embed/?username=wordspy”>
</script>

This code points to a script that resides on the TwitterCounter site, and that script contains the necessary instructions for contacting Twitter and grabbing your current follower count. This all happens behind the scenes, and fortunately you don’t have to give any of it a second thought (or even a first thought, for that matter).

After you decide which style you prefer, click inside the text box that appears below that style. Your browser automatically selects all the text, so press Ctrl+C (or Ô+C on a Mac) to copy it. Now open your online or local HTML editor, place the cursor where you want the badge to appear, and then press Ctrl+V (or  Ô+V on your Mac) to paste the code. If you’re working on a local copy of your page, be sure to upload the revised file to your Web site.

" Twitter tips: Displaying a badge that shows  total followers "


Reference : wiley.com