1

Is there anyway to get the total number of times an object has been liked in the Open Graph?

I'm referring to the new Like action: http://developers.facebook.com/docs/opengraph/actions/builtin/likes/

phwd
  • 19,975
  • 5
  • 50
  • 78
dornad
  • 1,274
  • 3
  • 17
  • 36

1 Answers1

1

The new Built-In Like is the same action as a normal Like. You query them the same way.

You could query the Graph API:

http://developers.facebook.com/tools/explorer?method=GET&path=%3Fids%3Dhttp%3A%2F%2Fwww.yourpage.com

Or, you could do an FQL Query:

SELECT url, id, type, site FROM object_url WHERE url = "http://www.yourpage.com"

Note:

  • The object that is Liked needs to correspond to a page that has Open Graph metatags.
  • Be aware of the differences between "Like_Count," "Share_Count," and "Total_Count" as discussed in this thread.
Community
  • 1
  • 1
Mac
  • 1,201
  • 2
  • 15
  • 28
  • (line-breaking in comments doesn't work, so I'll split this into several comments, so its easier to read) – dornad Jun 25 '12 at 23:31
  • Using either the Graph API or FQL is not working. With both I can query the object via its URL but I'm not getting any data regarding the like actions. – dornad Jun 25 '12 at 23:32
  • At this point I think I'm switching strategies and relying on a high-concurrency counter in my backend. – dornad Jun 25 '12 at 23:34
  • Two thoughts: (1) Are you sure the URL of your query exactly matches the URL of your Like action? (Ex: If you append a query string, or even a pound sign to the URL it creates a whole new Graph object with a different ID.) – Mac Jun 26 '12 at 11:47
  • (2) Does the page at the URL of the target graph object have fully defined Open Graph metatags? If not, the graph object won't be fully initialized, and you'll see very limited data in your query results. – Mac Jun 26 '12 at 11:49