Does this has anything to do with Facebook deprecating it’s old API? Because if it does, this are bad news imo, meaning other Jetpack code may also be close to obsolete.
@ethos It is somewhat related, yes, but you can reset assured: other aspects of Jetpack are safe. Sharing buttons are the only place where we use an unversioned Facebook Graph API endpoint.
Facebook told developers it’s going to deprecate this API some time ago. And you’re updating only now? When the old code it’s no longer working?
We’ve made multiple changes to the way we fetch sharing counts in the past year.
- When Facebook announced that they were deprecating version 1 of their API, we switched to our own API.
- A few months later, after chatting with Facebook Developers (see bug report here), we switched to using an unversioned Facebook Graph API endpoint, as Facebook confirmed that hitting that endpoint without specifying a version should default to v2.x, and that an authentication token was not required. You can check our changes in this Pull Request.
- Last week, Facebook changed the endpoint’s response structure; the data is still available, but the response is organized differently now. That change wasn’t documented nor announced in their changelog, and that’s what caused the problems with Jetpack and many other plugins, as mentioned here. We consequently adapted to the new response structure in Jetpack 4.2.2. You can see the change here.
I hope this clarifies things a bit. You can rest assured, we keep an eye on Facebook’s API changes, and we’ll update Jetpack when necessary ??