All Posts

This endpoint allows you to see all the posts in your page (posts that were created by the API or directly on facebook)


Settings:

URL

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

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

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.....


Response:

{
"status": "OK",
"from": "463745743546345",
"count": 25,
"posts": [{
      "id": "119324881085321_122093459712345",
      "message": "Hello fans!",
      "created_time": "1783596120",
      "updated_time": "1783596120",
      "permalink_url": "https://www.facebook.com/...",
      "full_picture": "https://scontent...",
      "is_published": true,
      "shares": 3,
      "total_comments": 3,
      "total_reactions": 5,
      "attachments": { "data": [ { "media_type": "photo", "url": "..." } ] }
    }],
"paging": { "after": "QVFIU...", "hasNext": true },
"reason": 1
}


Response-Explain:

Parameter

Description

status

OK or FAIL

count

Total posts in this batch

from

Your ID for the service

posts

Array of all posts inside your facebook page

Value

Information

id

This is the postId

message

The body of the post

created_time

Post create time. UNIX UTC timestamp (int seconds)

updated_time

If the post was edited, this is the time. UNIX UTC timestamp (int seconds)

permalink_url

Link directly to the post

full_picture

Image that you provided for the post, if any

is_published

true - the post is live in the page

false - this is a schedule future post and not published yet

scheduled_publish_time

will only appear if "is_published" = false.

this will show the future UNIX timestamp for when the post will be published

shares

The total amount of shares this post has (int)

total_comments

The total amount of comments this post has (int)

for getting the actual comments, use the getComments api endpoint

total_reactions

The total reactions (like) for the post

attachments

An array of objects that contains media_type and url to provide all the media that was uploaded for the post (photos/videos)

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 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