Example usage for twitter4j StatusUpdate setInReplyToStatusId

List of usage examples for twitter4j StatusUpdate setInReplyToStatusId

Introduction

In this page you can find the example usage for twitter4j StatusUpdate setInReplyToStatusId.

Prototype

public void setInReplyToStatusId(long inReplyToStatusId) 

Source Link

Usage

From source file:org.tomitribe.chatterbox.twitter.adapter.TwitterResourceAdapter.java

License:Apache License

private void replyTo(final Status status, final String reply, final boolean prefix) throws TwitterException {
    final String message;

    if (prefix) {
        message = "@" + status.getUser().getScreenName() + " " + reply;
    } else {/*from w  w  w.jav  a2s  . c o m*/
        message = reply;
    }

    final StatusUpdate statusUpdate = new StatusUpdate(message);
    statusUpdate.setInReplyToStatusId(status.getId());
    twitter.updateStatus(statusUpdate);
}

From source file:org.tweetalib.android.model.TwitterStatusUpdate.java

License:Apache License

public StatusUpdate getT4JStatusUpdate() {
    StatusUpdate statusUpdate = new StatusUpdate(mStatus);

    if (mInReplyToStatusId != null) {
        statusUpdate.setInReplyToStatusId(mInReplyToStatusId);
    }/*from   www.  ja va 2  s  . com*/

    if (mMediaFilePath != null) {
        try {
            statusUpdate.setMedia(getMediaFile(mMediaFilePath));
        } catch (IOException error) {
            error.printStackTrace();
        } catch (OutOfMemoryError error) {
            error.printStackTrace();
        }
    }

    return statusUpdate;
}