Create twitter application and tweet



I have created an app namely TestApp. I am expecting that when this app is launched. A user “@IamUser” logs into twitter, twitter confirms if user authorizes TestApp to tweet content on his account. Then TestApp tweets content on “@IamUser”'s account.

Could somebody please tell me how this can be achieved. Is there any documentation, tutorial or sample code for this? I assume its the most basic task.


Slightly complex to answer, as we don’t have a lot of information here. It will depend on whether your app is a web app, a mobile app, etc. Many third-party libraries provide great support for this, depending on the language your app is written in.

If you’re building a mobile app using Fabric, then the iOS and Android Twitter Kit code provides simple and easy Login with Twitter functionality which enables you to have a user authenticate and then your app can act as that user account. For a web app, you’d need to do a three-legged flow to have the user login and redirect back to your app with a token.

We provide a wide variety of code samples on our TwitterDev Gallery - perhaps you will find something useful there.


thank you @andypiper … I apologize for not providing enough info on this. Its a webapp with a java backend. I will checkout the three-legged flow.

Thank you. Will reach out to you if I am still running into issues.