Through its API, Twitter allows developers to write scripts and clients that provide a wealth of extra features and functionality to enrich the micro-blogging experience.

Most of these applications are completely legitimate and include things like Twitter for iPhone, Flipboard, bit.ly, Twittercounter and Posterous.

Sometimes we accidentally authorise unwelcom scripts to access our Twitter profiles, which can lead to unwelcome automated tweets and direct messages, and even password exploits and the spread of malware.

If your Twitter profile is behaving strangely, there’s a good chance that you’ve provided access to one or more of these unsavoury guests. Fortunately, it’s easy to be rid of them once and for all. You just have to be a little responsible.

Click on the drop-down arrow next to your username in the top-right corner of the page, and choose Settings

Click on the Applications tab

(Applications used to be called Connections.)

Scroll down the page. Some of these apps will be read-only, which means they cannot publish anything on your Twitter profile. Others will have read and write access, which means they most definitely can, and these are the ones that need your full attention.

If there’s anything in your Applications list that you don’t recognise, like or need, click on the Revoke Access button to remove it, and Twitter will immediately take action. Repeat as necessary.

Unless you see something that looks really, really dubious, don’t worry. Chances are your account hasn’t been exploited in any serious way. If it makes you feel better then go ahead and change your password – doing this a few times a year is good practice anyway – but 99.99 per cent of the crap that people give access to in their Twitter profiles are harmless (if irritating) applications that don’t do much more than auto-tweet their spammy marketing messages. Still, best to be rid of them. Otherwise, it makes you look like a spammer.

Also, don’t be too concerned if you’ve got a lot of apps tied to your account – just be sure that they’re trustworthy. For example, at the time of writing I have 35 applications that I have authorised to have access to my Twitter profile. That seems like quite a lot, but I can assure you that they are all 100 per cent legitimate.

It’s a good idea to review your Twitter applications on regular basis – I recommend a minimum of once each month, and even weekly if you’re very active on the network. Lead by example, and encourage your friends to be proactive, too, particularly if they’re having problems with their accounts.