Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>try another way to integerate twitter in your app</p> <ol> <li>Using auth &amp; webview(Twitter4j library)</li> </ol> <p><a href="http://davidcrowley.me/?p=410" rel="nofollow">http://davidcrowley.me/?p=410</a></p> <p><a href="http://www.mokasocial.com/2011/07/writing-an-android-twitter-client-with-image-upload-using-twitter4j/" rel="nofollow">http://www.mokasocial.com/2011/07/writing-an-android-twitter-client-with-image-upload-using-twitter4j/</a></p> <p>code(url open in web view)</p> <pre><code> twitter = new TwitterFactory().getInstance(); twitter.setOAuthConsumer(TwitterConstants.CONSUMER_KEY, TwitterConstants.CONSUMER_SECRET); RequestToken requestToken = null; try { requestToken = twitter.getOAuthRequestToken(); System.out.println("requesttoken"+requestToken); } catch (TwitterException e) { e.printStackTrace(); } twitterUrl = requestToken.getAuthorizationURL(); ConfigurationBuilder builder = new ConfigurationBuilder(); builder.setOAuthAccessToken(TwitterConstants.ACCESS_TOKEN); builder.setOAuthAccessTokenSecret(TwitterConstants.ACCESS_TOKEN_SECRET); builder.setOAuthConsumerKey(TwitterConstants.CONSUMER_KEY); builder.setOAuthConsumerSecret(TwitterConstants.CONSUMER_SECRET); OAuthAuthorization auth = new OAuthAuthorization(builder.build()); twitter = new TwitterFactory().getInstance(auth); try { twitter.updateStatus("Hello World!"); } catch (TwitterException e) { System.err.println("Error occurred while updating the status!"); } </code></pre> <p>2. On Button Click(Without auth)</p> <pre><code> String message=""; Intent i = new Intent(Intent.ACTION_VIEW); i.setData(Uri.parse("http://twitter.com/?status=" + Uri.encode(message))); startActivity(i); </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload