I'm trying to get the number of comments on a specific link, I currently do this:
<span
class="fb-comments-count fb_comments_count_zero"
data-href="http://la-url-dónde-hay-comentarios/"
fb-xfbml-state="rendered"
>
However, for some months now, he has thrown this warning:
fb: comments-count has been deprecated. Please use
FB.api()
.
link
I want to do the migration using FB.api()
, but I can not find specific information in the link documentation, the last thing I tried to do is:
FB.api(
"/",
{
"id": "http:\/\/www.ejemplo.com\/\/comments"
},
function (response) {
console.log(response);
}
);
But only an object returns with the id
and nothing else.