Tuesday, October 20, 2009

Twitter Followers Bird image on Blogger

The instructions on http://twittercounter.com/pages/buttons page says you need to use the script at the bottom in order to post a box on your blog.

I quickly took a look at the script generated for the nice bird icon and realized they are using php to modify the image with information passed in the image url, very clever.
TwitterCounter for @codepyro

Blogger does not allow cross scripting javascript so instead you would need to grab the direct html that the javascript would generate. Here is the example, just change Codepyro in the username to your twitter username.


<div id='TwitterCounter'>
<a href='http://twittercounter.com/codepyro?from=button' target='_new' title='TwitterCounter for @codepyro'>
<img alt='TwitterCounter for @codepyro' height='90' src='http://srv2.twittercounter.com/counter/index_bird.php?username=codepyro' style='border:none;' width='149'/>
</a>
</div>

Then paste the code into your blog, i used the expand widgets checkbox and posted the twitterFollower code in my profile section.


Stumble Upon CodePyro

No comments:

Post a Comment