Connect any user to his account from my java application using twitter4j



Hello, please i want to let any user of twitter can connect to his account from my java application. I want him to enter his email and password on my application and he can use all the fonctionalities which offers my application like he can post a tweet from my application on his account , he can display his followers. I am using twitter4j. So i didn’t found the code to let any user of my application can connect to his twitter account by entering his email and password. Someone can help me please? I need help and thank you very much .


You’ll want to use xAuth which is documented for twitter4j. Note that you can’t use xAuth without applying for access from Twitter.

xAuth access is restricted to approved applications. If your application is a desktop or mobile application that has no other recourse but to utilize xAuth, send a detailed request to Include the name of your application, the consumer key, the application ID (if available), and a summary of how xAuth is best-suited for your application.