I am developing an android application and want to integrate Twitter.

What I understand is if on user's device, official android Twitter app
is installed then we can authenticate using account manager.
AccountsByType is "com.twitter.android.auth.login"
and if not installed then show web page.

Is my understanding correct?

Now authenticating using twitter web login page is working fine.
But how do I login using account manager?

I got token and token secret using account manager from

As I am using Twitter4J so I do following

    AccessToken a = new AccessToken(token,secret);
                Twitter twitter = new TwitterFactory().getInstance();

                try {
                        User_Id = twitter.getScreenName();
                        return true;
                } catch (TwitterException e) {
                        return false;

Authentication fails.

CONSUMER_KEY & CONSUMER_SECRET are the keys I got when I registered
the app at twitter... but I dont understand how can I use these keys
with Official Android Twitter app authentication?

Pls. let me know

Twitter developer documentation and resources: https://dev.twitter.com/doc
API updates via Twitter: https://twitter.com/twitterapi
Issues/Enhancements Tracker: https://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 

Reply via email to