我创建了一个使用twitter4j的应用程序,但是转推了&回复我个人资料中的帖子,但不会回复用户的个人资料。
private void authorize(){
ConfigurationBuilder cb = new ConfigurationBuilder();
cb.setUser(userLogin);
cb.setPassword(userPassword);
cb.setDebugEnabled(true);
cb.setOAuthConsumerKey(mConsKey);
cb.setOAuthConsumerSecret(mConsSecret);
cb.setOAuthAccessToken(mAccessToken);
cb.setOAuthAccessTokenSecret(mAccessTokenSecret);
TwitterFactory tf = new TwitterFactory(cb.build());
twitter = tf.getInstance();
if(twitter != null){
handler.sendEmptyMessage(AUTHENTICATION_SUCCESS);
}else{
handler.sendEmptyMessage(AUTHENTICATION_FAILED);
}
}
private void reply(){
try{
twitter.updateStatus(new StatusUpdate(replyText)
.inReplyToStatusId(status.getId()));
handler.sendEmptyMessage(END_USER_ACTION);
}catch(TwitterException tEx){
Log.e(tEx.getExceptionCode(), tEx.toString());
handler.sendEmptyMessage(AUTHENTICATION_FAILED);
}
}
private void retwit(){
try{
twitter.retweetStatus(status.getId());
handler.sendEmptyMessage(END_USER_ACTION);
}catch(TwitterException tEx){
handler.sendEmptyMessage(AUTHENTICATION_FAILED);
}
}
我做错了什么?