Completely new to processing, please help! (twitter4j)

If I've posted this in the wrong forum I am so sorry, please tell me where to put it!

I've copied a sketch for searching tweets and so far i've successfully managed to get the tweets to the console, and have a background. What I need to do now is find a way to get that info into the drawing! I'm using the Twitter4j library. (Once I know how to do it I'd like to have the user profile picture, tweet and time to all be seperate, but I think I can sort that by myself after studying the library a bit more).

import twitter4j.util.*;
import twitter4j.*;
import twitter4j.api.*;
import twitter4j.conf.*;
import twitter4j.json.*;
import twitter4j.auth.*;

static String OAuthConsumerKey = "...";
static String OAuthConsumerSecret = "...";
static String AccessToken = "...";
static String AccessTokenSecret = "...";

String keywords[] = {"meaning of life"};

PImage bg;
int y;
TwitterStream twitterStream = new TwitterStreamFactory().getInstance();

void setup(){

  size(1920, 1080);
  // The background image must be the same size as the parameters
  // into the size() method. In this program, the size of the image
  // is 640 x 360 pixels.
  bg = loadImage("twitterbackground.jpg");

  if (keywords.length==0){
    twitterStream.filter(new FilterQuery().track(keywords));

void draw() {


void connectTwitter() {
  twitterStream.setOAuthConsumer(OAuthConsumerKey, OAuthConsumerSecret);
  AccessToken accessToken = loadAccessToken();

// Loading up the access token
private static AccessToken loadAccessToken() {
  return new AccessToken(AccessToken, AccessTokenSecret);

StatusListener listener = new StatusListener(){
  public void onStatus(Status status){
    String tweet = status.getText();
    String user = "@" + status.getUser().getScreenName();
    tweet = user + " - " + tweet;
  public void onDeletionNotice(StatusDeletionNotice statusDeletionNotice) {
    //System.out.println("Got a status deletion notice id:" + statusDeletionNotice.getStatusId());
  public void onTrackLimitationNotice(int numberOfLimitedStatuses) {
    //  System.out.println("Got track limitation notice:" + numberOfLimitedStatuses);
  public void onScrubGeo(long userId, long upToStatusId) {
    System.out.println("Got scrub_geo event userId:" + userId + " upToStatusId:" + upToStatusId);

  public void onException(Exception ex) {
  public void onStallWarning(StallWarning warning){


Thank you so, so much! <3


This discussion has been closed.