added exit code parameter to displayError
added twitter API