by chimeracoder · 11y ago · 0 comments
The example responses they provide are correct... except when they aren't. They use heterogenous JSON in their responses (silently replacing string literals with arrays, but only for some responses, etc.). They've added error codes without updating the docs for months on end (which sort of defeats the point of an error code - what use is it if you don't know what the error means?)
The only way I'm notified of these changes is when people file bug reports with the library, and I always have to ask them to tell me the exact query that cause the error for them, because they're almost impossible to reproduce otherwise[0], and the API is so inconsistent that I can't try and manually search for similar responses that will cause the error.
On the other hand, the Twitter API is a seamless[1] way to interface with an incredibly useful and powerful product, and it's a great source of data. I just wish the developer experience were seamless.
[0] e.g. https://github.com/ChimeraCoder/anaconda/issues/82
[1] Assuming your client library works, but I can't assume that if I'm the one responsible for maintaining it!
> changing it too often for my liking
Does not compute.
As others have said, I have had the misfortune of working on a project that used the FB API and relying on a feature that just inexplicably stopped working right around the time we were supposed to go live.
I was already personally uninterested in FB when this happened, but it gave me concrete belief of two very simple realisations:
- Tying your success to the whims of a third party company's developers is going to end in tears
- A motto like "Move fast and break stuff" is just an attempt to re-brand their fucking terrible development practices in a way that junior developers will treat as a positive thing.
That was a few years back, maybe they're better now. But I doubt it.
Both Facebook and Twitter are a complete dream compared to Valve's API for Steam and Team Fortress 2. Working with that is a complete nightmare, if it even provides a fraction of the capability you need (which it almost certainly does not).
The fact is, even with a large corp to corp relationship, you still can't absolutely rely on API consistency... it's pretty sad, but true... Netflix, Twitter, FB, Google and others have changed/revoked APIs before with minor to significant impace.
This is part of the reason why you shouldn't try to make applications designed to scale/adapt for years... design the simplest thing that does the job, and in as modular a way as possible. Avoid "enterprise" patterns as much as possible in favor of the simplest thing that works and is cheap/easy to replace if/when needed. It doesn't mean don't test, consider performance or write good code, just don't rely on it being around, and over-invest in that it likely won't.
You never know... a piece of software I once wrote to test our own product turned into its' own product and pieces of it are still in fortune 100 deployments... It's horrible, and was a hack to begin with. It didn't even support half the specification it was designed for (only the parts we needed)... just the same, it got the job done.
IIRC he also had support for making requests/responses in your browser to test, but that could just be an idea that never got implemented.