Note that there are some explanatory texts on larger screens.

plurals
  1. POUsing Twitter in app
    primarykey
    data
    text
    <p>I'm using Twitter API in my app to post status and retrieve it , I tried too many codes that was their best so far without errors.I started by posting Status but I got no errors but no status was posted </p> <p>my code : </p> <pre><code>public class Asy extends AsyncTask&lt;String, Void,MainActivity&gt; { private Exception exception; public static String consumerKey = "**************"; public static String consumerSecret = "************"; public final static String accesstoken= " *************"; public final static String accesstokensecret="*******"; private final String CALLBACKURL = "T4J_OAuth://callback_main"; Twitter twitter ; protected MainActivity doInBackground(String... urls) { ConfigurationBuilder builder = new ConfigurationBuilder(); builder.setOAuthConsumerKey(consumerKey); builder.setOAuthConsumerSecret(consumerSecret); Configuration configuration = builder.build(); TwitterFactory factory = new TwitterFactory(configuration); twitter = factory.getInstance(); try { AccessToken a = new AccessToken(acc,accsec); twitter.setOAuthAccessToken(a); twitter.updateStatus("First trial on twitter"); } catch (TwitterException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } return null; } protected void onPostExecute(MainActivity feed) { // TODO: check this.exception // TODO: do something with the feed } </code></pre> <p>}</p> <p>I used asynchronous task and I called it in my main activity by :</p> <pre><code>Asy task= new Asy (); task.execute(); </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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