Need help troubleshooting tweeting device

I've only made one thing with Arduino in my life: a device that tweets when my dryer is done. I built it based off code provided here: https://makezine.com/projects/make-34/the-dryer-messenger/

It's worked nearly perfectly for the past 5 years but now it has been very unreliable.

Through a 3.5mm input, it monitors the status of the dryer. This still works properly. Once it detects that the dryer is finished, it tries to connect to my wifi to tweet through this library: http://arduino-tweet.appspot.com/

This is where it seems to break. My code thinks that the tweet is properly posted but it doesn't go through. The WiFly device properly connects to the Wifi and tries to send the tweet but it fails.

I can post all of the code if you'd like but it's nearly identical to the code linked to the makezine page.

The important part that isn't working is as follows:

#include <string.h>
#include "TwitterWiFly.h"

#define LIB_DOMAIN "arduino-tweet.appspot.com"

TwitterWiFly::TwitterWiFly(const char *token) : token(token)
{
}

TwitterWiFly::TwitterWiFly(WiFlySerial *_wifly, const char *token) : token(token)
{
	wifly = _wifly;
}

bool TwitterWiFly::post(const char *msg)
{
	parseStatus = 0;
	statusCode = 0;
	if(wifly->openConnection(LIB_DOMAIN))
	{
		wifly->println("POST http://" LIB_DOMAIN "/update HTTP/1.0");
		wifly->print("Content-Length: ");
		wifly->println(strlen(msg)+strlen(token)+14);
		wifly->println();
		wifly->print("token=");
		wifly->print(token);
		wifly->print("&status=");
		wifly->println(msg);
	}
	else
		return false;
	
	return true;
}

Does anyone have any tips for troubleshooting this? I assume my code is fine but I don't know what to do if the Twitter Library I'm using is failing to operate.

Since nothing else has changed, my guess is the server at appspot.com is not responding as well as it used to. Google around to see if there have been other complaints about it.

I tried by no one seems to be using it, at least publically.

I found out just now that I can make it tweet if I manually enter a URL using the twitter library's format.

For example if I go to http://arduino-tweet.appspot.com/update?token=MY_TOKEN_ID&status=test

It will post a tweet instantly with the status value.

After you call .post() with your message, are you calling .checkStatus()? You may be getting an error return from the server. That might tell you why the tweet is not going through.

Thanks for the help. I just figured it out. The tweeting library website was returning a 403. Someone else had the same problem on a different type of project using the same library. I found the answer and updated code here: Add "Host" header to address HTTP 403 error by JChristensen · Pull Request #1 · NeoCat/Arduno-Twitter-library · GitHub