Problem Getting Arduino To Tweet

Below is my code. I’m simply trying to get a push button to send a tweet. The devices I’m using are the Arduino Uno and Ethernet Shield. It works fine if I have the tweet msg in the setup function, but as soon as I attach it to an if statement in the loop, it does not even connect to the server in my serial monitor. I don’t know what the problem is, it looks right to me…I really appreciate you alls help!

#include <SPI.h> // needed in Arduino 0019 or later
#include <Ethernet.h>
#include <Twitter.h>

// The includion of EthernetDNS is not needed in Arduino IDE 1.0 or later.
// Please uncomment below in Arduino IDE 0022 or earlier.
//#include <EthernetDNS.h>

int button1 = 11; // button1 put into pin 11
int button2 = 9; // button1 put into pin 9
int button3 = 12; // button1 put into pin 12
int ledRed = 5; // red led put into pin 5
int ledGreen = 6; // green led put into pin 6
int buttonState1 = 0;

// Ethernet Shield Settings
byte mac = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };

// If you don’t specify the IP address, DHCP is used(only in Arduino 1.0 or later).
byte ip = { 192, 168, 1, 18 };

// Your Token to Tweet (get it from http://arduino-tweet.appspot.com/)
Twitter twitter("");

// Message to post
char msg = “Hello #test”;
char msg1 = “Hello, it’s #yes”;
char msg2 = “Hello, it’s me #hello”;

void setup()
{
delay(1000);
Ethernet.begin(mac, ip);
// or you can use DHCP for autoomatic IP address configuration.
// Ethernet.begin(mac);
Serial.begin(9600);
Serial.println(“connecting …”);
pinMode(9, INPUT);
pinMode(11, INPUT);
pinMode(12, INPUT);
pinMode(5, OUTPUT);
pinMode(6, OUTPUT);

}

void loop()
{

buttonState1 = digitalRead(button1);

byte inChar;

inChar = Serial.read();
delay(100);
if(buttonState1 == HIGH)
{
Serial.println(“connecting …”);
if (twitter.post(msg))
{
// Specify &Serial to output received response to Serial.
// If no output is required, you can just omit the argument, e.g.
// int status = twitter.wait();
int status = twitter.wait();

if (status == 200) {
Serial.println(“OK.”);
}
else
{
Serial.print("failed : code ");
Serial.println(status);
}

inChar = 0;
}
}

if (button2 = HIGH) {
if (twitter.post(msg1)) {
// Specify &Serial to output received response to Serial.
// If no output is required, you can just omit the argument, e.g.
// int status = twitter.wait();
int status = twitter.wait(&Serial);
if (status == 200) {
Serial.println(“OK.”);
} else {
Serial.print("failed : code ");
Serial.println(status);
}
} else {
Serial.println(“connection failed.”);
}
}

if (button3 = HIGH) {
if (twitter.post(msg2)) {
// Specify &Serial to output received response to Serial.
// If no output is required, you can just omit the argument, e.g.
// int status = twitter.wait();
int status = twitter.wait(&Serial);
if (status == 200) {
Serial.println(“OK.”);
} else {
Serial.print("failed : code ");
Serial.println(status);
}
} else {
Serial.println(“connection failed.”);
}
}
}