You can use fql query to get data. The fql query will look like this:
SELECT url, share_count, like_count, comment_count, total_count
FROM link_stat WHERE url="www.example.com/page1.html"
and you can get the data at the URL encoding the request and send it to
https://api.facebook.com/method/fql.query?format=xml&query="SELECT url, share_count,..."
Now you get
<share_count>1</share_count>
<like_count>3</like_count>
<comment_count>4</comment_count>
<total_count>8</total_count>
you can now store the values ββfor each url in the array and then sort it.
For more information on statistics, check link.
source
share