summaryrefslogtreecommitdiff
path: root/src/main/TweetShell.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/TweetShell.java')
-rw-r--r--src/main/TweetShell.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/TweetShell.java b/src/main/TweetShell.java
index e8d387d..a86bad3 100644
--- a/src/main/TweetShell.java
+++ b/src/main/TweetShell.java
@@ -93,7 +93,10 @@ public class TweetShell implements TwitterApi.PinSupplier {
@Override
public void tweetGenerated(JSONObject obj) {
try {
- System.out.println("Got tweet: " + obj.getString("text"));
+ JSONObject userObj = obj.getJSONObject("user");
+ System.out.println("Got tweet: "
+ + userObj.getString("screen_name") + ": "
+ + obj.getString("text"));
} catch (JSONException ex) {
getLogger().log(Level.SEVERE, "Failed to parse tweet", ex);
}