Example usage for twitter4j Twitter getMutesIDs

List of usage examples for twitter4j Twitter getMutesIDs

Introduction

In this page you can find the example usage for twitter4j Twitter getMutesIDs.

Prototype

IDs getMutesIDs(long cursor) throws TwitterException;

Source Link

Document

Returns an array of numeric user ids the authenticating user is muting.

Usage

From source file:twitter4j.examples.mute.GetMutingUsersIDs.java

License:Apache License

/**
  * Usage: java twitter4j.examples.mute.GetMutingUsersIDs
  *//from  w  ww  .  j av  a2  s  .c om
  * @param args message
  */
public static void main(String[] args) {
    try {
        Twitter twitter = new TwitterFactory().getInstance();
        IDs ids = twitter.getMutesIDs(-1L);
        for (long id : ids.getIDs()) {
            System.out.println(id);
        }
        System.out.println("done.");
        System.exit(0);
    } catch (TwitterException te) {
        te.printStackTrace();
        System.out.println("Failed to get muting user ids: " + te.getMessage());
        System.exit(-1);
    }
}