aspose file tools*
The moose likes Android and the fly likes authenticate the user to be able to access twitter services Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Mobile » Android
Bookmark "authenticate the user to be able to access twitter services" Watch "authenticate the user to be able to access twitter services" New topic
Author

authenticate the user to be able to access twitter services

Sherif Shehab
Ranch Hand

Joined: Mar 05, 2007
Posts: 477

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 ?


Thanks,
Sherif
rob michael
Greenhorn

Joined: May 22, 2011
Posts: 27
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.


Have a look at my blog: http://automateddeveloper.blogspot.com/
Or even my Android Apps (website): http://www.mobile.thirdmindmedia.co.uk
Sherif Shehab
Ranch Hand

Joined: Mar 05, 2007
Posts: 477

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

Joined: May 22, 2011
Posts: 27
checkout

http://www.pakzilla.com/2009/11/23/how-to-register-an-app-with-twitter/

http://dev.twitter.com/pages/api_faq
Sherif Shehab
Ranch Hand

Joined: Mar 05, 2007
Posts: 477

Done i successfully registered my application ,any tutorials or examples for using OAuth ?
Sherif Shehab
Ranch Hand

Joined: Mar 05, 2007
Posts: 477

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

Joined: May 22, 2011
Posts: 27
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
 
subject: authenticate the user to be able to access twitter services
 
Similar Threads
Authentication Design with EJB
Can webstart Help ?
java client for sharepoint webservices
SAAJ (Web Service Client) and Integrated windows Authentication
Authentication Design with EJB