Skip to content

Instantly share code, notes, and snippets.

@yusuke
Created July 24, 2013 14:30
Show Gist options
  • Save yusuke/6071086 to your computer and use it in GitHub Desktop.
Save yusuke/6071086 to your computer and use it in GitHub Desktop.
public class Main {
public static void main(String[] args) {
final Twitter twitter = TwitterFactory.getSingleton();
final TwitterStream stream = TwitterStreamFactory.getSingleton();
stream.addListener(new UserStreamAdapter() {
public void onStatus(Status status) {
if (!status.isRetweet() && satatus.getText().contains("おっぱい")) {
try {
twitter.createFavorite(status.getId());
} catch (TwitterException ignore) {
}
}
}
});
stream.user();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment