Create a Comment

This endpoint allows you to create a comment on an existing post

You can either comment on the post itself (it is called "top level comment") or comment on a comment (it is called "reply comment")


Settings:

URL

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

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 wish to comment on (if top level comment)

no*

15625364215_56994166514

commentId

The comment ID you wish to comment on (if reply comment)

no*

652346734563_3463234623

body

The new body of the post. It can have plain text only and \n for line break

Maximum 8,000 characters.

yes

Thank you for the comment!

url

You can provide an image with the comment.

here you can provide the url (HTTPS only)

no

https://example.com/image.jpg

* You need to provide either the postId or the commentId, not both. if both will be provided, the system will use the commentId (reply comment)

Response:

{
"status": "OK",
"commentId": "15234562345623_952362434423178",
"target": "15234562345623_425235245346"
"timestamp": 1600115719,
"from": "463745743546345",
"reason": 1
}


Response-Explain:

Parameter

Description

status

OK or FAIL

target

The original postId or commentId provided in the request

commentId

The new commentId created. you can use this for reply to a comment

timestamp

Time stamp of the message

from

Your ID for the service

body

The comment you wrote

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

4

commentId or postId is missing

5

Missing or invalid content. the 'body' or "url" is invalid or wrong

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

8

The "body" is more than 8,000 characters long

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 posted was rejected by meta or bad media / format / size. could also indicate policy violation inside the content.

16

General error, try again