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);