All Comments

This endpoint allows you to see all the comments of a post or a comment in your page (comments that were created by the API or directly on facebook)


Settings:

URL

https://api.99digital.co.il/facebook/page/getComments

Method

JSON via POST


Body:

Parameter

Description / Example

Mandatory

Example

apiKey

Your API key for the service

yes

4124-634t462-634733463-5734346

from

The ID you received for the connection

yes

463745743546345

postId

The post ID you want to get the comments from

no*

15625364215_56994166514

commentId

The comment ID you wish to get all the comments inside it

no*

634645636423_5675674565

filter

"toplevel" if you wish only top level comments

"stream" if you wish to get everything

default is "toplevel"

no

toplevel

order

options:

"chronological"

"reverse_chronological"

default is "chronological"

no

chronological

limit

How many posts to get (limit pagination)

between 1 to 100

default if not provided: 25

no

25

after

if you are using limit paging, you can provide the "after" value from previous response to load the next batch

no

U56WDF34FA4TER3DA.....

* Either postId or commentId is required, not both.


Response:

{
"status": "OK",
"from": "463745743546345",
"target": "15625364215_56994166514",
"count": 25,
"comments": [{
      "id": "119324881085321_122093459712345",
      "message": "Hello fans!",
      "from": { "id": "1234567890", "name": "Israel Israeli", "picture": { "data": { "url": "..." } } },
      "created_time": "1783596120",
      "permalink_url": "https://www.facebook.com/...",
      "is_hidden": false,
      "like_count": 3,
      "comment_count": 3,
      "total_reactions": 5
    }],
"paging": { "after": "QVFIU...", "hasNext": true },
"reason": 1
}


Response-Explain:

Parameter

Description

status

OK or FAIL

count

Total posts in this batch

target

the commentId or postId you provided

from

Your ID for the service

comments

Array of all posts inside your facebook page

Value

Information

id

This is the commentId

message

The body of the post

created_time

Comment create time. UNIX UTC timestamp (int seconds)

from

id, name and profile picture of the comment creator

permalink_url

Link directly to the comment

like_count

The total like this comment has

is_hidden

true - the comment is hidden in the page

false - this comment is live on facebook

comment_count

The total comments replies this comment has

paging

key that contains two values: "after" that represents the parameter if you wish to get the next batch.

"hasNext" can have true if you have more data to load or false if this is the last data

reason

'reason' is the status explanation in case of FAIL

1

not FAIL. the status is OK

2

Your "from" number account does not exist, or JSON syntax error

3

wrong apiKey

5

Missing or invalid content. the 'body'

6

Wrong connection type. you keys/id is correct but you are using the wrong endpoint

(for example: your onboarding was for facebook messenger but you are using this facebook posts endpoint)

7

Onboarding still in progress

10

You must do onboarding again, the connection has expired

12

Rate limit error. too many requests. please wait few minutes and try again

13

The postId or commentId is invalid or wrong

15

The content you provided was rejected by meta or bad media / format / size. could also indicate policy violation inside the content.

16

General error, try again