The days of drunken facebooking and tweeting may be over thanks to a new web application.

The Social Media Sobriety Test, which can be downloaded to your computer for free, aims to stop you writing offensive emails and messages while under the influence.

The app posts a series of simple problems which are difficult to complete when drunk.

These include dragging your mouse in a straight line, guessing how long 30 seconds is, and typing the alphabet backwards.

If the user can’t complete the tasks, they will be locked out of Facebook and a message will be posted on their Facebook and Twitter page which tells followers that they are ‘too drunk to post right now’.

The app also works for MySpace, YouTube and Flickr.