This afternoon I received an inquiry from someone about how I created the Facebook like count calculator. Rather than just reply to their email I decided to just post the core code so you can program the same thing!
It’s pretty easy to obtain the like count via Facebook’s old rest API. While there may be a graph API method of accomplishing this now, this script still works perfectly well. For the simple form that I created on the Facebook like count page, I simply received what the user submitted via $_POST and then outputted it via the Google Charts API. If you want your own script for calculating likes, shares, and comments, the code is below!
Mediabistro Event
Job seekers! Prepare for big interviews and land your dream job with the help of our Job Search Intensive, and interactive online event starting June 11, 2013. Over four weeks, we'll show you how tow revamp your resume, get noticed by recruiters, nail your interviews, and negotiate your salary. Sign up for our Webcast Only or Full Registration package. Either way, save by signing up soon.
Save with our Early Bird Rates
Job seekers! Prepare for big interviews and land your dream job with the help of our Job Search Intensive, and interactive online event starting June 11, 2013. Over four weeks, we'll show you how tow revamp your resume, get noticed by recruiters, nail your interviews, and negotiate your salary. Sign up for our Webcast Only or Full Registration package. Either way, save by signing up soon.