Getting "[Agent] ERROR: the index 'tweet' does not exist"

Hey guys! So I finally got an Imp and I’m trying to figure out how to send tweets with it! I’m pretty sure I have everything set up right so that it tweets when it turns on but for osme reason I keep getting the following error:

“Getting “[Agent] ERROR: the index ‘tweet’ does not exist””

Any ideas why? :\

AGENT:
// Vars
API_KEY <- “xxxxxxxxxxxxxxx”;
API_SECRET <- “xxxxxxxxxx”;
AUTH_TOKEN <- “xxxxxxx-xxxxxxxxxxx”;
TOKEN_SECRET <- “xxxxxxxxxxxxx”;
aMessage <- “Imp Tweet test”;

class Twitter{}
twitter <- Twitter(API_KEY, API_SECRET, AUTH_TOKEN, TOKEN_SECRET);

// Methods

function sendTweet(x)
{
twitter.tweet(aMessage);
}

// Application
device.on(“tweet”, sendTweet);

DEVICE:
led <- hardware.pin9;
led.configure(DIGITAL_OUT)
dMessage <- “Imp Tweet test d”;

led.write(1);
agent.send(“tweet”,1);
led.write(0);

if you have used the class Twitter{} (class TwitterClient) from the example, it should be twitter.Tweet(aMessage);

…and you obviously need to include the twitter class in your code, not just “class Twitter{}”.

OH OKAY Haha thanks guys! I had a feeling that was incorrect but I wasn’t sure. When I checked the API, all it said was to have a “twitter.tweet(message)”; but nothing about instantiating the class.