Back in October of 2015, Twitter made an announcement that had a huge portion of the marketing community up in arms. They declared that they would no longer be supporting the “share count API” that allowed social media sharing buttons to display the shares/retweets/likes on a given post link.
The reason for this, as detailed in a blog post, was that there was not actually such an API available. There was a common workaround for accessing that data via the framework Twitter was using for their site. However, in an effort to make the site function better on the back end, they had to change the way data was handled. They decided that creating a new API and supporting that kind of data exports was simply not in the cards, and Twitter dropped support.
From that moment onwards, social sharing buttons that included a share count for Twitter displayed zero or nothing at all. Some of them simply broke because they didn’t have proper error handling. Some updated quickly do remove a zero, others required some manual tweaks.
Some time later, something similar happened with Facebook. Now, Facebook definitely had a shared count API, but they keep updating their API on a rolling basis. At any given time, they have support for half a dozen or more versions of their API, to avoid suddenly cutting off plugins that rely on data, and giving them time to adapt.
One small change back in a 2014 update of the API was the removal of shared counts from all buttons except the official Facebook button. However, since the older versions of the API were still valid, it took until late 2016 for that update to hit the status as oldest available, and finally removed the shared count.
This prompted posts like this one about how shared counts were disappearing and how, soon, virtually no social network would offer that data for button purposes. That hasn’t panned out, not really. In fact, there are some button suites that have managed a workaround for Facebook and Twitter, to pull their data. So, if you really must have data for Facebook and Twitter, which social plugins will you need to use?
There’s really only one way that a social plugin can harvest data about share counts now that the API is gone, and that’s with scraping. If you’re familiar with data harvesting in bulk, you know all about scraping. If not, read on.
Scraping is essentially just loading a page, looking for a specific piece of data on that page, and copying it to a file. If you perform a Google search, copy and paste each title from the top page of search results, and save it, you’re scraping the data. However, “scraping” generally refers to the act of a bot pulling this data in bulk. If you wanted the top 100 search results for a list of 500 keywords, that’s hours and hours of manual work, or a few minutes with a bot.
The problem with scraping is that it loads the full version of the site to get at the data, and that is a heavy drain on the resources of the server in question. This can in extreme cases actually bring down a site, or act like a DDoS, simply because it’s a lot of data being loaded.
Compared that to an API feed, which might only be a few bytes in size and thus extremely light on server load, and you can see why scraping is frowned upon. Many sites will either ban scraper IPs or will implement Captchas you need to fill in or break to get at the data. This is why many bulk scraper programs like Scrapebox allow you to feed in a list of proxy IPs to use to harvest your data; so it doesn’t all come from one IP and so it doesn’t get banned or flagged.
It is all just another arms race between sites and marketers, of course. There are so many of those these days.
Why does any of this matter? Well, any social sharing button suite that has data for Facebook or Twitter has to be getting that data from somewhere. It isn’t from an API, so it has to be from the live site somehow. It’s either from search results or from pages, and either way, it needs to be scraped. It’s just that rather than doing it yourself, the owner of the social plugin is doing it.
This matters for two reasons. First, it means that the data likely isn’t going to be live. It’s probably on a cached basis. The first time someone loads a sharing bar for a post it pulls the data and caches it. The cache lasts for X amount of time, probably 12 or 24 hours, until the toolbar checks again, as long as new requests are happening. This allows older posts to not drain resources updating counts, and keeps popular posts updated, while minimizing the amount of requests the plugin owner has to make.
It also means that any plugin scraping data is vulnerable. If their scraping system is blocked, the plugin might stop functioning until they are able to fix it. If they’re blocked in a robust enough way, it could kill the plugin entirely. This is a risk you run.
Another issue that comes up is that, because of the scraping, initial loads might take longer as you have to wait for the data to be scraped rather than loaded from an API. It probably won’t affect your site speed, but you aren’t going to be getting top-tier performance out of these plugins necessarily.
Now, as far as I can tell, very few social sharing plugins support both Facebook and Twitter without some kind of workaround. The primary list I have found is solely for Twitter. You can assume that they will work for Facebook as well, though that is not strictly true.
The Facebook workaround is actually a pretty strange case. They didn’t actually get rid of the data or the API, they just have some odd restrictions on it. I’m not deep into the Facebook developer scene, so I don’t know the ins and outs of it. I can just say that many more plugins support Facebook than support Twitter, and that there are several workarounds involving code you can use to harvest the data yourself. As such, I’m primarily focusing on Twitter, which intentionally removed the data.
The Twitter workaround I’ve found requires using a third party system, in this case OpenShareCount.com. This site harvested shared count data for some time prior to the API shutdown and harvests ongoing data once you set your site to use it. You need to authorize the app and make an edit to your social sharing plugin.
So, as it happens, these plugins don’t actually support Twitter share counts; they’re just plugins that you can edit in a way that allows you to use an API other than Twitter’s, specifically the NSC API.
The list of supported plugins is:
If you’re using a third party button plugin that is not on that list, you can contact NSC with the name of the plugin and ask if they’ll support it. They’re generally pretty good at adding new buttons to the list, since most of them work in roughly the same way.
If you’re using a custom plugin that you coded yourself, you can modify it to use the NSC shared counts API instead. What you need to do is find line 1 and replace it with line 2 in your code:
It’s worth noting that NSC shared counts aren’t necessarily going to be 100% accurate. They indexed a huge number of pages, but not all of them, so smaller sites might not have accurate counts for historical data, and some sites might only have a partial index. You can read an explanation of how NSC works and why the counts might be off here.
SharedCount.com is one of the larger popular share count services, and they had a rough patch where they were about to discontinue their business because their primary offerings, Facebook and Twitter, had both dropped shared counts. While Twitter, of course, has maintained that drop, Facebook apparently worked out a deal with SharedCount. They posted briefly about it, and Facebook is listed on their supported services page.
Now, SharedCount is not a plugin and as such does not necessarily have a role here, but it IS a source of Facebook data if you want to set up scraping for your own purposes.
Even if you can’t find a social plugin that supports both Facebook and Twittter, you can still focus on growing your social media accounts, and you can still do that by using a Facebook website box or Twitter box toshow your basic profile information. You can add these to a sidebar or footer fairly easily, though they take up more real estate. They’re also more likely to get people to actually follow you, instead of just share a post, which is an arguably more beneficial action.
The fact is, social share counts aren’t likely to be easy to keep around. Sure, you can use a workaround for Twitter and Facebook now, but what if another network drops it, or the services you use like NSC disappear? It seems to be a losing battle, but for now, we still have a few solutions left for us to see social shares.