Twitter/X API ‐ should work, but doesn't
September 3, 2023 3:46 AM
We have a web application that posts Twitter updates on behalf of users. For years, we've been using the TwitterOAuth PHP library with no issues. That library is no longer being supported by the author for obvious reasons, but the final version 6.1.0 released in July 2023 should still work.
However, nothing is working -- our application can't even get past the authentication mechanism, where Twitter is throwing a code 32 ("Could not authenticate you") even though we've re-generated our application keys using the v2 of the API.
Does anyone know of a working PHP example for posting tweets using the TwitterOAuth PHP library that has been shown to work in 2023?
However, nothing is working -- our application can't even get past the authentication mechanism, where Twitter is throwing a code 32 ("Could not authenticate you") even though we've re-generated our application keys using the v2 of the API.
Does anyone know of a working PHP example for posting tweets using the TwitterOAuth PHP library that has been shown to work in 2023?
Is it using v1 or v2 of the API?
Are there any other error messages at all?
I had some code using the v2 API that started failing because, on my Twitter developer page, I had to move the "standalone app" inside of a "project". This was easily done and the code started working again. But a couple of weeks later it would revert back and stop working again. I gave up.
So I would check your Twitter developer portal for any error messages showing up there. And double check everything you possibly can. And acknowledge it could just be Twitter being broken and there's nothing you can do.
posted by fabius at 9:34 AM on September 3, 2023
Are there any other error messages at all?
I had some code using the v2 API that started failing because, on my Twitter developer page, I had to move the "standalone app" inside of a "project". This was easily done and the code started working again. But a couple of weeks later it would revert back and stop working again. I gave up.
So I would check your Twitter developer portal for any error messages showing up there. And double check everything you possibly can. And acknowledge it could just be Twitter being broken and there's nothing you can do.
posted by fabius at 9:34 AM on September 3, 2023
This thread is closed to new comments.
But have you tried setting up a new developer account with new authorization? They may well have just disabled all the old authentication tokens. Be prepared for Twitter to want to charge you significant money for a new account with the permissions you want although the free write-only level may be enough for your use.
posted by Nelson at 7:03 AM on September 3, 2023