So now you are all set for the coding part. Should you change your “Access level” anytime in future, you can re-generate your Access Token by clicking the button “Recreate my access token”. Do note that the “Access level” shown under the “Your access token” should match the one shown under “OAuth Settings”. Now, go back to “Details” tab, notice that your newly set “Access level” is now reflected under the “OAuth Settings”.įinally, generate your Access Token (if not already generated) by clicking the button at the bottom of “Details” tab. IMPORTANT – You should never share Consumer Key and Consumer Secret with any one.įor this example, you need a minimum of Read and Write “Access level”.Ĭlick on the “Settings” tab and under “Application Type”, select the radio button option “Read and Write” or “Read, Write and Access direct messages” which ever you like and click on the “Update this Twitter application’s settings” button at the bottom. Under the “Details” tab and “OAuth Settings”, you will find the “Consumer Key” and “Consumer Secret”. Once your application is created successfully, you will be redirected to the My Applications page.Ĭlick on the application you’ve just created. Go to My Applications section and click on “Create a new application”.įill out the mandatory fields – Name, Description and Website. Log into Twitter Developer Site using your Twitter credentials. To start with you need to have an active Twitter account. In this post, I will demonstrate how you can post a Tweet in Java using the Twitter REST API and an open source third party twitter integration library in java called Twitter4J.