Facebook — Messenger
Xem hội thoại của Page (Get Page conversations) — facebook.get_page_conversations
Lists Messenger conversations of a Page, most recently updated first. Pass user_id (PSID) to find the thread with one person. Supports paging.
| Tác động | Rủi ro | Cần duyệt | Idempotent | Scopes |
|---|---|---|---|---|
| NONE | low | không | có | pages_messaging |
Input
| Field | Nhãn | Kiểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
page_id | Mã Page (ID) | string | có | Page id. From facebook.list_managed_pages. |
user_id | Mã người dùng (PSID) | string | không | Only the thread with this person's PSID. From a facebook.message_received event. |
fields | Các trường cần lấy (fields) | string | không | Comma-separated Graph fields to return, e.g. "id,message,from,created_time". |
limit | Số kết quả tối đa | integer | không | Max items per page (1-100). Min 1. Max 100. |
after | Con trỏ trang tiếp theo | string | không | Cursor for the next page, from paging.cursors.after of the previous call. |
Field thêm: bỏ qua.
Output
| Field | Nhãn | Kiểu | Mô tả |
|---|---|---|---|
data | Danh sách kết quả | array of object | |
data[].id | string | ||
data[].updated_time | string | ||
data[].snippet | string | ||
data[].message_count | integer | ||
paging | Phân trang | object | |
paging.cursors | object |
Xem tin nhắn trong hội thoại (Get conversation messages) — facebook.get_conversation_messages
Lists messages in a Messenger conversation. Request fields such as message,from,created_time to get content; supports paging.
| Tác động | Rủi ro | Cần duyệt | Idempotent | Scopes |
|---|---|---|---|---|
| NONE | low | không | có | pages_messaging |
Input
| Field | Nhãn | Kiểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
page_id | Mã Page (ID) | string | có | Page id. From facebook.list_managed_pages. |
conversation_id | Mã hội thoại | string | có | Conversation id, e.g. "t_123". From facebook.get_page_conversations. |
fields | Các trường cần lấy (fields) | string | không | Comma-separated Graph fields to return, e.g. "id,message,from,created_time". |
limit | Số kết quả tối đa | integer | không | Max items per page (1-100). Min 1. Max 100. |
after | Con trỏ trang tiếp theo | string | không | Cursor for the next page, from paging.cursors.after of the previous call. |
Field thêm: bỏ qua.
Output
| Field | Nhãn | Kiểu | Mô tả |
|---|---|---|---|
data | Danh sách kết quả | array of object | |
data[].id | string | ||
data[].message | string | ||
data[].created_time | string | ||
data[].from | object | ||
paging | Phân trang | object | |
paging.cursors | object |
Xem chi tiết tin nhắn (Get message details) — facebook.get_message_details
Reads one Messenger message by id: text, sender, recipients, time and attachments. Pass fields to choose what to return.
| Tác động | Rủi ro | Cần duyệt | Idempotent | Scopes |
|---|---|---|---|---|
| NONE | low | không | có | pages_messaging |
Input
| Field | Nhãn | Kiểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
page_id | Mã Page (ID) | string | có | Page id. From facebook.list_managed_pages. |
message_id | Mã tin nhắn | string | có | Message id. From facebook.get_conversation_messages. |
fields | Các trường cần lấy (fields) | string | không | Comma-separated Graph fields to return, e.g. "id,message,from,created_time". |
Field thêm: bỏ qua.
Output
| Field | Nhãn | Kiểu | Mô tả |
|---|---|---|---|
id | Mã tin nhắn | string | |
message | Nội dung | string | |
created_time | Thời gian tạo | string | |
from | Người gửi | object | |
attachments | Tệp đính kèm | object |
Gửi tin nhắn Messenger (Send Messenger text message) — facebook.send_message
Sends a text message from a Page to a person (PSID). Outside the 24-hour window use messaging_type MESSAGE_TAG with a tag. Waits for human approval.
| Tác động | Rủi ro | Cần duyệt | Idempotent | Scopes |
|---|---|---|---|---|
| WRITE | high | có | không | pages_messaging |
Input
| Field | Nhãn | Kiểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
page_id | Mã Page (ID) | string | có | Page id. From facebook.list_managed_pages. |
recipient_id | Mã người nhận (PSID) | string | có | Person's Page-scoped id (PSID). From facebook.get_page_conversations or a facebook.message_received event. |
text | Nội dung tin nhắn | string | có | Message text to send. |
messaging_type | Loại tin (messaging_type) | string | không | RESPONSE (default) replies within 24h of their last message; MESSAGE_TAG sends later with a tag. One of: RESPONSE, UPDATE, MESSAGE_TAG. |
tag | Thẻ tin nhắn (bắt buộc với MESSAGE_TAG) | string | không | Message tag, required when messaging_type is MESSAGE_TAG, e.g. HUMAN_AGENT or ACCOUNT_UPDATE. |
Field thêm: bỏ qua.
Output
| Field | Nhãn | Kiểu | Mô tả |
|---|---|---|---|
recipient_id | Mã người nhận (PSID) | string | |
message_id | Mã tin nhắn | string |
Thẻ duyệt: hiển thị dạng message (page → page_id, recipient → recipient_id, text → text).
Gửi tệp qua Messenger (Send Messenger media message) — facebook.send_media_message
Sends an image, video, audio or file (https URL) from a Page to a person (PSID). Outside the 24-hour window use MESSAGE_TAG. Waits for human approval.
| Tác động | Rủi ro | Cần duyệt | Idempotent | Scopes |
|---|---|---|---|---|
| WRITE | high | có | không | pages_messaging |
Input
| Field | Nhãn | Kiểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
page_id | Mã Page (ID) | string | có | Page id. From facebook.list_managed_pages. |
recipient_id | Mã người nhận (PSID) | string | có | Person's Page-scoped id (PSID). From facebook.get_page_conversations or a facebook.message_received event. |
media_type | Loại tệp | string | có | Kind of file at url: image, video, audio or file (any other document). One of: image, video, audio, file. |
url | URL tệp (https) | string | có | Public https URL of the file to send. |
messaging_type | Loại tin (messaging_type) | string | không | RESPONSE (default) replies within 24h of their last message; MESSAGE_TAG sends later with a tag. One of: RESPONSE, UPDATE, MESSAGE_TAG. |
tag | Thẻ tin nhắn (bắt buộc với MESSAGE_TAG) | string | không | Message tag, required when messaging_type is MESSAGE_TAG, e.g. HUMAN_AGENT or ACCOUNT_UPDATE. |
Field thêm: bỏ qua.
Output
| Field | Nhãn | Kiểu | Mô tả |
|---|---|---|---|
recipient_id | Mã người nhận (PSID) | string | |
message_id | Mã tin nhắn | string |
Thẻ duyệt: hiển thị dạng message (page → page_id, recipient → recipient_id, media → url).
Đánh dấu đã xem tin nhắn (Mark message seen) — facebook.mark_message_seen
Shows the seen receipt to a person in Messenger for the latest message they sent to the Page.
| Tác động | Rủi ro | Cần duyệt | Idempotent | Scopes |
|---|---|---|---|---|
| WRITE | low | không | có | pages_messaging |
Input
| Field | Nhãn | Kiểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
page_id | Mã Page (ID) | string | có | Page id. From facebook.list_managed_pages. |
recipient_id | Mã người nhận (PSID) | string | có | Person's Page-scoped id (PSID). From facebook.get_page_conversations or a facebook.message_received event. |
Field thêm: bỏ qua.
Output
| Field | Nhãn | Kiểu | Mô tả |
|---|---|---|---|
recipient_id | Mã người nhận (PSID) | string |
Bật/tắt trạng thái đang nhập (Toggle typing indicator) — facebook.toggle_typing_indicator
Turns the typing indicator on or off for a person in Messenger, so a slower reply feels live.
| Tác động | Rủi ro | Cần duyệt | Idempotent | Scopes |
|---|---|---|---|---|
| WRITE | low | không | có | pages_messaging |
Input
| Field | Nhãn | Kiểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
page_id | Mã Page (ID) | string | có | Page id. From facebook.list_managed_pages. |
recipient_id | Mã người nhận (PSID) | string | có | Person's Page-scoped id (PSID). From facebook.get_page_conversations or a facebook.message_received event. |
on | Bật (true) hoặc tắt (false) | boolean | có | true shows the typing indicator, false hides it. |
Field thêm: bỏ qua.
Output
| Field | Nhãn | Kiểu | Mô tả |
|---|---|---|---|
recipient_id | Mã người nhận (PSID) | string |