VI | EN
Message us on Messenger
Developer resources

Published posts — Facebook API

Page Published Posts · call it through Quantri360 with one API key for your own accounts / assets that you connected and authorized — 360 handles request signing and refreshing the authorization you granted.

Page Published Posts

GET/{version}/{page_id}/published_postsVia 360: GET https://partner.quantri360.com/v1/facebook/{version}/{page_id}/published_posts
Coming soon. This API already runs in production through 360 and pricing is being finalised — you can read the docs and prepare your integration now.
Description

Chỉ các bài Trang đã đăng (không gồm bài người khác đăng lên Trang, không gồm bài hẹn giờ / chưa đăng). Hợp để thống kê nội dung, đếm tương tác từng bài.

  • comments.summary.total_count ở đây đếm bình luận cấp 1 (thứ tự ranked); gọi /{post_id}/comments?filter=stream&summary=true sẽ ra số lớn hơn vì gồm cả trả lời.
  • Chuỗi fields dài với limit lớn có thể làm phản hồi rất nặng — với thống kê nên dùng .limit(0) cho comments / reactions.

Request

Endpoint

GET https://partner.quantri360.com/v1/facebook/{version}/{page_id}/published_posts

Authentication & shop

NameInTypeSampleDescription
AuthorizationheaderheaderBearer q360_live_ab12cd34_…Khóa API của brand (tạo ở mục API key). Bắt buộc với mọi request. Brand suy từ key — không truyền mã brand.
platform_shop_idquerystringact_123456789 hoặc 1234567890Tài sản Facebook brand đã nối với 360: tài khoản quảng cáo (act_<id> hoặc <id>), Page id hoặc Pixel id — lấy ở GET /v1/platforms. Có thể bỏ khi đường dẫn đã chứa act_<id> / page id của brand.

Request parameters

NameInTypeRequiredSampleDescription
versionpathstringYesv25.0
page_idpathstringYes303881193849929Id Trang đã nối.
fieldsquerystringNoid,created_time,is_published,status_type,permalink_url,shares,comments.summary(true).limit(0),reactions.summary(true).limit(0)Trường cần lấy (như /feed).
sincequerystringNo2026-10-01Từ thời điểm (YYYY-MM-DD hoặc unix giây).
untilquerystringNo2026-10-29Đến thời điểm.
limitqueryintNo25Số bài mỗi trang (tối đa 100).
afterquerystringNopaging.cursors.after của trang trước.

Pagination

Lặp khi có paging.next: thêm after = paging.cursors.after.

Request examples

curl -s "https://partner.quantri360.com/v1/facebook/v25.0/303881193849929/published_posts?fields=id%2Ccreated_time%2Cstatus_type%2Cpermalink_url%2Cshares%2Ccomments.summary(true).limit(0)%2Creactions.summary(true).limit(0)&limit=25" \
  -H "Authorization: Bearer $KEY"
Python
import requests

KEY = "q360_live_..."  # khóa API của brand
r = requests.get(
    "https://partner.quantri360.com/v1/facebook/v25.0/303881193849929/published_posts",
    params={
        "fields": "id,created_time,status_type,permalink_url,shares,comments.summary(True).limit(0),reactions.summary(True).limit(0)",
        "limit": 25
    },
    headers={"Authorization": f"Bearer {KEY}"},
    timeout=60,
)
print(r.status_code)
print(r.json())
Node.js
const KEY = 'q360_live_...'; // khóa API của brand
const url = new URL('https://partner.quantri360.com/v1/facebook/v25.0/303881193849929/published_posts');
for (const [k, v] of Object.entries({"fields":"id,created_time,status_type,permalink_url,shares,comments.summary(true).limit(0),reactions.summary(true).limit(0)","limit":25})) url.searchParams.set(k, typeof v === 'object' ? JSON.stringify(v) : String(v));
const r = await fetch(url, {
  method: 'GET',
  headers: { Authorization: `Bearer ${KEY}` },
});
console.log(r.status, await r.json());
PHP
<?php
$key = 'q360_live_...'; // khóa API của brand
$url = 'https://partner.quantri360.com/v1/facebook/v25.0/303881193849929/published_posts' . '?' . http_build_query(['fields' => 'id,created_time,status_type,permalink_url,shares,comments.summary(true).limit(0),reactions.summary(true).limit(0)', 'limit' => 25]);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer ' . $key]);
$res = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $status, "\n", $res;

Response

Response fields (as returned by Facebook)

NameTypeSampleDescription
dataobject[]Bài đã đăng, mới nhất trước.
idstring303881193849929_1018968570638564`<page_id>_<post_id>`.
created_timestring2026-06-20T20:00:49+0000ISO 8601, UTC.
is_publishedbooltrue
status_typestringadded_photos
sharesobject{"count":11}Chỉ có khi bài có lượt chia sẻ.
commentsobject`{data: [], summary: {total_count, order, can_comment}}` — `total_count` đếm bình luận cấp 1.
reactionsobject`{data: [], summary: {total_count, viewer_reaction}}`.
pagingobject`{cursors: {before, after}, next}`.

Response sample

{
  "data": [
    {
      "id": "303881193849929_1018968570638564",
      "created_time": "2026-06-20T20:00:49+0000",
      "comments": {
        "data": [],
        "summary": {
          "order": "ranked",
          "total_count": 8,
          "can_comment": true
        }
      },
      "shares": {
        "count": 11
      },
      "reactions": {
        "data": [],
        "summary": {
          "total_count": 135,
          "viewer_reaction": "NONE"
        }
      }
    },
    {
      "id": "303881193849929_1010145338187554",
      "created_time": "2026-06-10T06:54:19+0000",
      "comments": {
        "data": [],
        "summary": {
          "order": "chronological",
          "total_count": 0,
          "can_comment": true
        }
      },
      "shares": {
        "count": 9
      },
      "reactions": {
        "data": [],
        "summary": {
          "total_count": 18,
          "viewer_reaction": "NONE"
        }
      }
    }
  ],
  "paging": {
    "cursors": {
      "before": "QVFIVExyMHBp…",
      "after": "QVFIVDFjb29N…"
    },
    "next": ""
  }
}

Get started

  1. Sign up for Partner
  2. Enable a data type of the Trang & Messenger group on the platform page
  3. Create an API key (tick the Facebook channel)
  4. Call it as in the examples above