Step 1. Firstly sign in to your Twitter account.
Step 2. Follow this link https://apps.twitter.com and create a new Twitter app by clicking the “Create New App” button:
Step 3. Upon creating your app, you’ll be transferred to your application creation page. Enter your application’s name, its description (for example, App for auto-posting), your Website URL and Callback URL in the fields. Please add the slash sigh in the end of your URLs.
Read and accept the “Twitter Developer Agreement” and check the box next to “Yes, I agree”. Push the button “Create your Twitter Application”:
Then click “Update Settings”:
Step 5. Go to “Keys and Access Tokens”. You will see API Key and API Secret. Your Twitter application is ready to use.