You can update "What are you doing?" via Twitter.updateStatus() method.
See also twitter4j.examples.Update.java for detail.
Status status = twitter.updateStatus(latestStatus);
System.out.println("Successfully updated the status to [" + status.getText() + "].");
import twitter4j.Status;
import twitter4j.TwitterException;
final EditText input_pw = (EditText)findViewById(R.id.password);
final EditText input_text = (EditText)findViewById(R.id.input_text);
Button signin = (Button)findViewById(R.id.sign_in_button);
public void onClick(View v){
//TODO : Below code will be inserted here
});
Status status;
try {
status = twitter.updateStatus(update_text);
Toast.makeText(getApplicationContext(), "Successfully updated the status to [" + status.getText() + "].", Toast.LENGTH_LONG).show();
} catch (TwitterException e) {
Toast.makeText(getApplicationContext(), "Fail to update text [" + e + "].", Toast.LENGTH_LONG).show();
}
'TwitterAPI' 카테고리의 다른 글
[Twitter4J] OAuth support (0) | 2011.02.10 |
---|---|
Twitter4J TwitterException -1 발생 (1) | 2010.02.05 |
Twitter4J를 사용하기 위한 JAVA CLASSPATH 설정 (0) | 2009.10.22 |