A simple PHP script to display twitter followers
I have seen quite a lot of people asking how to get the avatars of their Twitter followers displaying on their website. Well, as a break to custom coding an e-commerce site for a client, I have cooked up a little code that does just that.
In addition to the obvious, that it displays the avatars of your followers on your website, it has a few little extras.
- It displays the total number of Twitter followers above the list of avatars.
- If Twitter falls of it’s perch or decides to return an error, it doesn’t display anything, so no breakages there.
- You need only enter your Twitter username and password in order for it to do it’s thing.
The Twitters Followers avatar list is easy to style using the image class ‘twitter_followers’.
Would give you something like this, look at the bottom of the page. The page is a work in progress, but you get the idea. If you don’t see anything, Twitter has fallen of it’s perch or decided to pull a ‘too many tweets’ error.
If you find this ‘Twitter_followers’ script useful or have any observations, leave a comment.