• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

authenticate the user to be able to access twitter services

 
Ranch Hand
Posts: 493
Android Eclipse IDE Oracle
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ?

 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
S Shehab
Ranch Hand
Posts: 493
Android Eclipse IDE Oracle
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
checkout

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

http://dev.twitter.com/pages/api_faq
 
S Shehab
Ranch Hand
Posts: 493
Android Eclipse IDE Oracle
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Done i successfully registered my application ,any tutorials or examples for using OAuth ?
 
S Shehab
Ranch Hand
Posts: 493
Android Eclipse IDE Oracle
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic