Determining Facebook Like Count and Twitter Tweet Count for a URL
We needed to determine how many likes and how many tweets each personalized web page got—without visiting each site and noting the count by hand.
This site had the solution for Facebook likes. Let's say your page, containing like and tweet buttons is at http://the.url.com. Simply type the following at the command line:
You'll get back an XML document containing the like count.
For Twitter, I had to reverse-engineer their button code. Simply type the following at the command line:
You'll get back a JSON document containing the tweet count.