Tweets not appearing on timeline


#1

Since the beginning of March my site’s tweets are only partially appearing on the timeline.

I’m running a non-profit website for lost & found ads. A user will make an ad about a lost or found object. All ads are also tweeted by the site with a php cron job that is running every 15 minutes. This script is really simple, it goes like this:

  • login with consumer key and -secret of the site’s account
  • authenticate with token and secret of the site’s application
  • check credentials so we are sure we are logged in
  • see if there are new ads
  • if yes, tweet each new ad (status/update for each ad)
  • set the flag for the ad that it has been tweeted (so it won’t be tweeted again)
  • for debugging: send an email with some info, like the # of ads tweeted

So to be clear, it’s not the users that are tweeting, it’s the site itself, on its own Twitter account. Up until March this worked flawlessly. Now, when I look at the httpstatuses the first tweet gets a code 200, but following tweets get 403. And even that is not always the case as the first mostly also gets a 403. I checked the rating limits but we are not even remotely touching any rate limit with 5 tweets at the most for each time the script runs. I also reset both key and token but without succes.

I always used the abrahams php class but to make sure that this library is not the issue I made some test code that uses codebird.php. I get exactly the same results with either library.

Can anybody please help me or give me tips where to look? What to check? Thanks in advance.


#2

Ok, I found the issue. It was the length of the tweet because of elongation of the t.co wrapper. I was looking in the wrong direction because this coincided with the migration to API 1.1