I would like to have a list of my most liked posts from facebook, and place it in the sidebar. Is there a way for doing it? (and if so, how?)
In other words, 1) queries Facebook for the number of likes, 2) suggests to hook into the 'liking' action, counting & logging the 'likes' on your site.
Since it looks like you can only query one page (URL) at a time (unless a Facebook guru can correct me?), you'd need some way of frequently caching the like counts of all your posts.
To get the 'most liked' posts, you could then simply query posts that have the meta key, and order by the meta value.
You can stick https://graph.facebook.com/ in front of any URL to see how many people liked it. It returns a JSON object with the URL and the number of "shares" for the URL.
Note: An OAuth token is not required to do this. You don't even have to be logged into Facebook.
Over time, you can poll those, store the info as meta data, and then order by it.
Related question: Top 3 posts in last week ordered by Facebook and Twitter share counts