Value don't sent tweet

Hi

Arduino three value read ppmS Mq135Pin and Mq4Pin but tweet sent “Tweet here”.

i need Tweet sent “Co2: ppmS AirQuality: Mq135Pin Metan: Mq4Pin”

Please help me.

#include <SPI.h>
#include <Ethernet.h>
#include <SoftwareSerial.h>

byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
byte server[] = { 184, 106, 153, 149 };
char *thingtweetAPIKey = "M";
EthernetClient client;
boolean MsgSent = false;
const int Sensor2 = 2;

const int analogPin = A0;
int Mq135Pin = A1;
int Mq4Pin = A2;
const int pwmPin = 9;

const long samplePeriod = 10000L;

SoftwareSerial sensor(5, 6);

const byte requestReading[] = {0xFF, 0x01, 0x86, 0x00, 0x00, 0x00, 0x00, 0x00, 0x79};
byte result[9];
long lastSampleTime = 0;

void setup()
{

Serial.begin(9600);
sensor.begin(9600);

pinMode(pwmPin, INPUT_PULLUP);
  
if (Ethernet.begin(mac) == 0) {
Serial.println("Failed to configure Ethernet using DHCP");
while(true);
}

pinMode(Sensor2, INPUT);
digitalWrite(Sensor2, HIGH);
delay(1000);
Serial.println("Hazir");

}

 void loop()
{
    Mq135Pin = analogRead(A1);
    Mq4Pin = analogRead(A2);
    
  long now = millis();
  if (now > lastSampleTime + samplePeriod) {
    lastSampleTime = now;
    int ppmV = readPPMV();
    int ppmS = readPPMSerial();
    int ppmPWM = readPPMPWM();
    Serial.print("CO2:");
    Serial.print(ppmS);
    Serial.print("   ");
    Serial.print("Hava Kalitesi:");
    Serial.print(Mq135Pin);
    Serial.print("   ");
    Serial.print("Metan:");
    Serial.println(Mq4Pin);
    Serial.println("------");
  }


if(digitalRead(Sensor2) == LOW)  
{
  if(MsgSent == false){
    MsgSent = sendMessage("Tweet here");
  
  if(MsgSent)
    Serial.println("Tweet gonderildi");
  
  else
    Serial.println("Tweet atilamadi");
    }
}

else{ 
MsgSent = false;
}

delay(1000);

}

int readPPMV() {
  float v = analogRead(analogPin) * 5.0 / 1023.0;
  int ppm = int((v - 0.4) * 3125.0);
  return ppm;
}

int readPPMSerial() {
  for (int i = 0; i < 9; i++) {
    sensor.write(requestReading[i]); 
  }
  //Serial.println("sent request");
  while (sensor.available() < 9) {};
  for (int i = 0; i < 9; i++) {
    result[i] = sensor.read(); 
  }
  int high = result[2];
  int low = result[3];
  return high * 256 + low;
}

int readPPMPWM() {
  while (digitalRead(pwmPin) == LOW) {};
  long t0 = millis();
  while (digitalRead(pwmPin) == HIGH) {};
  long t1 = millis();
  while (digitalRead(pwmPin) == LOW) {};
  long t2 = millis();
  long th = t1-t0;
  long tl = t2-t1;
  long ppm = 5000L * (th - 2) / (th + tl - 4);
  while (digitalRead(pwmPin) == HIGH) {};
  delay(10); // allow output to settle.
  return int(ppm);
}





boolean sendMessage( char *message)

{

boolean result = false;
const int tagLen = 16;
int msgLen = strlen(message) + tagLen + strlen(thingtweetAPIKey);
Serial.println("Baglaniyor");
if (client.connect(server, 80))

{

Serial.println("Tweet hazirlaniyor");

client.print("POST /apps/thingtweet/1/statuses/update HTTP/1.1\r\n");
client.print("Host: api.thingspeak.com\r\n");
client.print("Connection: close\r\n");
client.print("Content-Type: application/x-www-form-urlencoded\r\n");
client.print("Content-Length: ");
client.print(msgLen);
client.print("\r\n\r\n");
client.print("api_key="); // msg tag
client.print(thingtweetAPIKey); // api keyi yaz
client.print("&status="); // msg tag
client.print(message);// bu da bizim anlamlı mesajımız
client.println("\r\n");

}

else {
Serial.println("Baglanti saglanamadi");

}

// yanıt dizesi

if (client.connected()) {
Serial.println("Baglandi");
if(client.find("HTTP/1.1") && client.find("200 OK") ){
result = true;
}

else
Serial.println("Baglanti kesildi – 200 OK baglanamadi");
}

else {
Serial.println("Baglanti koptu");
}

client.stop();
client.flush();
return result;

}

is the problem in the code below when the code is properly indented?

    if(digitalRead(Sensor2) == LOW)
    {
        if(MsgSent == false){
            MsgSent = sendMessage("Tweet here");

            if(MsgSent)
            Serial.println("Tweet gonderildi");

            else
            Serial.println("Tweet atilamadi");
        }

    }

I need sent value "ppmS Mq135Pin and Mq4Pin".

This code send "tweet here".