File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

authenticate the user to be able to access twitter services

 
Sherif Shehab
Ranch Hand
Posts: 485
Android Eclipse IDE Oracle
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi pals ;

i wanna to develop a twitter client for Android OS just to update the status and to get friends updates, what is the best way and your recommendations to authenticate the user to be able to access twitter services via my client ?

 
rob michael
Greenhorn
Posts: 27
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Depending on your preferences, it might be worth looking into Twitter4J - Twitter4J is a Java library that provides a standard API around the Twitter user web services and provides all the objects you need to tweet, re-tweet, view users timelines, profiles etc.

Twitter authentication is done using OAuth, so you need to register for your application details on the Twitter site.

There is an example (plus source code) of very basic twitter functionality here: http://automateddeveloper.blogspot.com/2011/05/android-twitter-reader.html although it doesn't include the OAuth or updating stuff, it should give you an idea of how the Twitter4J API looks and how easy it sits with Android.


If you prefer to work with WebServices/JSON then you can just use the direct Twitter Web Services.


When developing the app, you will need to take care to optimize the caching etc, as Twitter limits the number of requests that can be made per hour, and if you dont manage the requests properly you can quite quickly hit the limit.
 
Sherif Shehab
Ranch Hand
Posts: 485
Android Eclipse IDE Oracle
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Twitter authentication is done using OAuth, so you need to register for your application details on the Twitter site.


How to register the application on the twitter site?
 
rob michael
Greenhorn
Posts: 27
 
Sherif Shehab
Ranch Hand
Posts: 485
Android Eclipse IDE Oracle
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Done i successfully registered my application ,any tutorials or examples for using OAuth ?
 
Sherif Shehab
Ranch Hand
Posts: 485
Android Eclipse IDE Oracle
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

In Twitter OAuth what should be the " callback " in my case , what i understood that call back is where the flow will go after making the authentication, but i'm developing android application , so what will be the call back in this case , or i should use "desktop" and let the user write down the given PIN ?

 
rob michael
Greenhorn
Posts: 27
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
just realised that I just replied to another of your posts on this topic in another thread - but in response to your earlier question, I have done a tutorial on how to create a Twitter app using OAuth and Twitter4J which covers callbacks etc. and includes the complete app source code.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic