• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Starting out with JTwitter in android

thameera

Member
I'm testing JTwitter on an android app.

Code:
OAuthSignpostClient oauthClient = new OAuthSignpostClient(
				consumerKey,
				consumerSecret, "oob");

oauthClient.authorizeUrl();
String v = OAuthSignpostClient.askUser("Please enter the verification PIN from Twitter");
oauthClient.setAuthorizationCode(v);
String[] accessToken = oauthClient.getAccessToken();
Twitter twitter = new Twitter("thameera", oauthClient);
System.out.println(twitter.getStatus("thameera"));

I've included the libraries and all. When I run the app in the emulator, it gives the error 'Unforunately AppName has stopped'.
What am I doing wrong?
 
The method OAuthSignpostClient.askUser() is desktop only (it uses Swing). This is described in the
javadoc.

You want to launch an intent to view the authorizeUrl webpage, then catch the callback.
 
Back
Top Bottom