guardian/frontend — pull request #518 by gklopper (2013-03-10 08:44:30+00:00)
Title: Added a social counts endpoint for a piece of content.

Work in progress (counts are not actually being used yet), I just want to know if it is worth doing this ourselves (we control data format, cache times etc) or do we hit a 3rd party directly.

Simple controller that returns share counts for
Facebook, Twitter, Linkedin, Reddit, Google plus (requires api key)

You hit a url that looks like... `http://localhost:9000/social-counts?url=http://www.guardian.co.uk/commentisfree&callback=counts`

and you get back data that looks like...

counts({
"linkedin":{"count":164},
"facebook":{"count":64},
"reddit":{"count":1},
"refreshStatus":true,
"googleplus":{"count":17},
"twitter":{"count":799}
});