2 Part question
1) So I am trying to figure out the difference between “liking” something on pinterest vs “liking” a business. Is it the same thing?
2) I want to implement people “liking” different pages on my website (such as pinterest) and track which page has the most likes. Do I have to save and track that in my database or facebook API will let me see which pages has most likes based on some criteria?
TLDR: Yes, they are the same thing.
A Facebook “Like” is what is an Open Graph Action. Liking something from within the Facebook web interface or via one of the Facebook plugins allows an easy implementation path. Pinterest uses a custom script that initiates a built-in like action.
Both types of like require there to be an object with open graph metadata that Facebook can scrape to get the information that will be shared on a timeline. That metadata could be served by Facebook on an internal page, or by an external page.
As for getting the number of likes, yes you can. Each canonical open graph URL gets an id within the Facebook system. This includes objects within the Facebook system.
So, the Pinterest Facebook page has an id of
253591661347566. You can find this by queryinghttps://graph.facebook.com/pinterest?fields=idThe Pinterest home page has an id of
185629821512802according tohttps://graph.facebook.com/http://pinterest.com?fields=id. (Not urlencoded for clarity). You could replacehttp://pinterest.comwith any other url, and get that pages id.For any object that you know the id, you can get information on the number of likes it has by adding
likesto thefieldsquerystring.If you’ve marked up your pages with an app id and admin information, you can see all of this and more through Facebook’s Insights.