A similar button shows my counter, but it does not appear on facebook api

If I go to https://developers.facebook.com/docs/plugins/like-button/ and enter https://www.ballantinesbarproject.fr/?name=epicerie and select the box-count value as layout. a similar button shows how the count is, as expected, since I liked the page. However, if I look at the facebook api:

REST: https://api.facebook.com/method/links.getStats?urls=https://ballantinesbarproject.fr/?name=epicerie&format=json

FQL: https://graph.facebook.com/fql?q=select%20url,%20like_count%20from%20link_stat%20where%20url=%22https://ballantinesbarproject.fr/?name=charlatan%22

(although one user claims that he can count in fql-api)

It says 0 likes. Why?

+4
source share
3 answers

I think you should use the following FQL:

select url, like_count from link_stat where url="https://ballentines.herokuapp.com/?name=charlatan"

Gives me

{
  "data": [
    {
      "url": "https://ballentines.herokuapp.com/?name=charlatan", 
      "like_count": 1
    }
  ]
}

as a result...

+2
source

The next query is a valid FQL query to get a comment or comment for a link

 select url, like_count from link_stat where url="https://ballentines.herokuapp.com/?name=charlatan"

I debugged the above query using Graph Explorer

Link: https://developers.facebook.com/tools/explorer/145634995501895/?fql=SELECT%20like_count%20FROM%20link_stat%20WHERE%20url%20%3D%20%27https%3A%2F%2Fballentines.herokuapp.com % 2F% 3Fname% 3Dcharlatan% 27

, like_count ( 3). enter image description here

, - "API- ", API- Graph API.

. Dropdown .

, , " ", . like_count 0 . . .

enter image description here

" ", , . " " " " . "like_count" 3, .

enter image description here

, "link_stat" FQL ,

, .

+3

Source: https://habr.com/ru/post/1538722/


All Articles