1) Signup for twitter.com, if not a member in Twitter

2) To create new app go to <a target='_blank' href='https://dev.twitter.com/apps/new'>https://dev.twitter.com/apps/new</a>
  
3) Fill with appropriate details.

4) Change access level to Read, write, and direct messages.
To change it, go to settings and then change Application type to Read, write, and direct messages

5) Copy details from the sections "OAuth settings" and "Your access token" to media edit page.