Facebook Likes, Twitter Follows and Feedburner Count in PHP with cURL/SimpleXML


Basic (no error handling) copy and paste code for getting Facebook Likes, Twitter Follows and a Feedburner Subscription count using PHP (with cURL):

Note: PHP must be compiled with cURL: http://uk.php.net/manual/en/curl.installation.php

Note: For the Feedburner API request to work you must have FeedCount activated in FeedBurner

References:

Update: The code in this article has been refactored in a later post to use APC caching to compensate for unreliable API responses.

Edit: Since posting the Feedburner API has been withdrawn :(

About Ingmar Boddington

Codemonkey, Sheffield, UK
This entry was posted in PHP and tagged API, cURL, Facebook, FeedBurner, PHP, SimpleXML, Twitter, XML. Bookmark the permalink.

2 Responses to Facebook Likes, Twitter Follows and Feedburner Count in PHP with cURL/SimpleXML

  1. Jasmine says:

    Thanks for the tut.
    but it does not show feedburner count, the only output i get is ‘Feedburner subscriber count:’ and it does not show the count… please help me to fix it.
    thanks

Comments are closed.