2

Using the old API I was able to get on each URL the: likes,shares,comments,click count. (used the links.getStats?urls=www.google.com)

How do I get all that information via the new API? I tried using https://graph.facebook.com/?id=http://www.google.com&fields=og_object{engagement}

From what i understand the engagement count is the sum of all the fields above..

How can i get each one separately? (and in one request!)

I was able to find the Likes and comments count by getting the ID from the URL and then asking for https://graph.facebook.com/381702034999?fields=likes.limit(0).summary(true),comments.limit(0).summary(true),engagement But what about shares and clicks? and why the engagement is so much bigger then the sum?

tubu13
  • 924
  • 2
  • 17
  • 34

1 Answers1

4

As far as I know it's not possible to reproduce the REST API's results with the current Graph API.

You could make a call like

/?fields=id,share,og_object{engagement{count},likes.summary(true).limit(0),comments.limit(0).summary(true)}&id=http://www.google.com

which only uses ONE request to also get the like and comment counts. It returns

{
  "id": "http://www.google.com",
  "share": {
    "comment_count": 2,
    "share_count": 14139003
  },
  "og_object": {
    "engagement": {
      "count": 14139003
    },
    "likes": {
      "data": [
      ],
      "summary": {
        "total_count": 87227,
        "can_like": true,
        "has_liked": false
      }
    },
    "comments": {
      "data": [
      ],
      "summary": {
        "order": "ranked",
        "total_count": 1263,
        "can_comment": true
      }
    },
    "id": "381702034999"
  }
}

Getting the click count is no longer possible IMHO.

Tobi
  • 31,405
  • 8
  • 58
  • 90