Find the count of the like on Graph Api

266 Views Asked by At

I use facebook graph api and I encountered a problem relating to likes.

My request: enter image description here

My goal is to find the count of the like. but the query timeout. What is the solution?

Thanx

2

There are 2 best solutions below

0
On BEST ANSWER

My goal is to find the count of the like

So you only want the overall number of likes, the counter, but not the individual likes?

Then you should ask for the summary via field expansion:

/{page_id}/feed?fields=likes.limit(0).summary(1)

For each feed item, you will get a likes data structure that looks like this:

  "likes": {
    "data": [
    ], 
    "summary": {
      "total_count": 12345
    }
  }
1
On

Try the options below.

  • Uncheck all the boxes and make the request again, if you give no error, go marking one by one until you find the problem.
  • Try not to use the limit (999999) is very, I've had problems trying to get as much information in one query page.
  • Make sure your access token created this with all the necessary permissions to your query.

I confess that I have never seen this error in the Graph API, is very generic and it is difficult to give you a more accurate suggestion.