Amar Amar - 3 months ago 8
Python Question

Get the facebook's posts' likes and share posts counts using HTTP request

I want to get post's likes count using

HTTP
request. I am doing in this way

https://graph.facebook.com/10153608167431961?fields=likes.limit(0).summary(true)?access_token=EAANep****


and getting the error


{
"error": {
"message": "Syntax error \"Expected end of string instead of \"?\".\" at character 14: likes.limit(0)?access_token=EA*****",
"type": "OAuthException",
"code": 2500,
"fbtrace_id": "FgmjqQQgY+J"
}
}


Is it syntactically something wrong?

Answer

Correct:

https://graph.facebook.com/10153608167431961?fields=likes.limit(0).summary(true)&access_token=xxx

You canĀ“t have more than one questionmark, separate the different parameter with &.