Search code examples
androidtwittertwitter4j

Android, Twitter, 'FOLLOW US'


I am building an android application and I am stuck at one place. I have integrated Twitter in my app using twitter4j, signpost apis. I am successful in writing code for putting text in user profile but I also want the user to follow my app when they click 'follow us on twitter' button.

Can anybody give me reference or guidance of writing such code?


Solution

  • What you are probably looking for is createFriendship()

    You can see how it is used here

    2016 Edit: Google code svn is broken and twitter 4j has moved http://twitter4j.org/en/api-support.html