Skip to content

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 độngRủi roCần duyệtIdempotentScopes
NONElowkhôngcópages_messaging

Input

FieldNhãnKiểuBắt buộcMô tả
page_idMã Page (ID)stringcóPage id. From facebook.list_managed_pages.
user_idMã người dùng (PSID)stringkhôngOnly the thread with this person's PSID. From a facebook.message_received event.
fieldsCác trường cần lấy (fields)stringkhôngComma-separated Graph fields to return, e.g. "id,message,from,created_time".
limitSố kết quả tối đaintegerkhôngMax items per page (1-100). Min 1. Max 100.
afterCon trỏ trang tiếp theostringkhôngCursor for the next page, from paging.cursors.after of the previous call.

Field thêm: bỏ qua.

Output

FieldNhãnKiểuMô tả
dataDanh sách kết quảarray of object
data[].idstring
data[].updated_timestring
data[].snippetstring
data[].message_countinteger
pagingPhân trangobject
paging.cursorsobject

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 độngRủi roCần duyệtIdempotentScopes
NONElowkhôngcópages_messaging

Input

FieldNhãnKiểuBắt buộcMô tả
page_idMã Page (ID)stringcóPage id. From facebook.list_managed_pages.
conversation_idMã hội thoạistringcóConversation id, e.g. "t_123". From facebook.get_page_conversations.
fieldsCác trường cần lấy (fields)stringkhôngComma-separated Graph fields to return, e.g. "id,message,from,created_time".
limitSố kết quả tối đaintegerkhôngMax items per page (1-100). Min 1. Max 100.
afterCon trỏ trang tiếp theostringkhôngCursor for the next page, from paging.cursors.after of the previous call.

Field thêm: bỏ qua.

Output

FieldNhãnKiểuMô tả
dataDanh sách kết quảarray of object
data[].idstring
data[].messagestring
data[].created_timestring
data[].fromobject
pagingPhân trangobject
paging.cursorsobject

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 độngRủi roCần duyệtIdempotentScopes
NONElowkhôngcópages_messaging

Input

FieldNhãnKiểuBắt buộcMô tả
page_idMã Page (ID)stringcóPage id. From facebook.list_managed_pages.
message_idMã tin nhắnstringcóMessage id. From facebook.get_conversation_messages.
fieldsCác trường cần lấy (fields)stringkhôngComma-separated Graph fields to return, e.g. "id,message,from,created_time".

Field thêm: bỏ qua.

Output

FieldNhãnKiểuMô tả
idMã tin nhắnstring
messageNội dungstring
created_timeThời gian tạostring
fromNgười gửiobject
attachmentsTệp đính kèmobject

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 độngRủi roCần duyệtIdempotentScopes
WRITEhighcókhôngpages_messaging

Input

FieldNhãnKiểuBắt buộcMô tả
page_idMã Page (ID)stringcóPage id. From facebook.list_managed_pages.
recipient_idMã người nhận (PSID)stringcóPerson's Page-scoped id (PSID). From facebook.get_page_conversations or a facebook.message_received event.
textNội dung tin nhắnstringcóMessage text to send.
messaging_typeLoại tin (messaging_type)stringkhôngRESPONSE (default) replies within 24h of their last message; MESSAGE_TAG sends later with a tag. One of: RESPONSE, UPDATE, MESSAGE_TAG.
tagThẻ tin nhắn (bắt buộc với MESSAGE_TAG)stringkhôngMessage tag, required when messaging_type is MESSAGE_TAG, e.g. HUMAN_AGENT or ACCOUNT_UPDATE.

Field thêm: bỏ qua.

Output

FieldNhãnKiểuMô tả
recipient_idMã người nhận (PSID)string
message_idMã tin nhắnstring

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 độngRủi roCần duyệtIdempotentScopes
WRITEhighcókhôngpages_messaging

Input

FieldNhãnKiểuBắt buộcMô tả
page_idMã Page (ID)stringcóPage id. From facebook.list_managed_pages.
recipient_idMã người nhận (PSID)stringcóPerson's Page-scoped id (PSID). From facebook.get_page_conversations or a facebook.message_received event.
media_typeLoại tệpstringcóKind of file at url: image, video, audio or file (any other document). One of: image, video, audio, file.
urlURL tệp (https)stringcóPublic https URL of the file to send.
messaging_typeLoại tin (messaging_type)stringkhôngRESPONSE (default) replies within 24h of their last message; MESSAGE_TAG sends later with a tag. One of: RESPONSE, UPDATE, MESSAGE_TAG.
tagThẻ tin nhắn (bắt buộc với MESSAGE_TAG)stringkhôngMessage tag, required when messaging_type is MESSAGE_TAG, e.g. HUMAN_AGENT or ACCOUNT_UPDATE.

Field thêm: bỏ qua.

Output

FieldNhãnKiểuMô tả
recipient_idMã người nhận (PSID)string
message_idMã tin nhắnstring

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 độngRủi roCần duyệtIdempotentScopes
WRITElowkhôngcópages_messaging

Input

FieldNhãnKiểuBắt buộcMô tả
page_idMã Page (ID)stringcóPage id. From facebook.list_managed_pages.
recipient_idMã người nhận (PSID)stringcóPerson's Page-scoped id (PSID). From facebook.get_page_conversations or a facebook.message_received event.

Field thêm: bỏ qua.

Output

FieldNhãnKiểuMô tả
recipient_idMã 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 độngRủi roCần duyệtIdempotentScopes
WRITElowkhôngcópages_messaging

Input

FieldNhãnKiểuBắt buộcMô tả
page_idMã Page (ID)stringcóPage id. From facebook.list_managed_pages.
recipient_idMã người nhận (PSID)stringcóPerson's Page-scoped id (PSID). From facebook.get_page_conversations or a facebook.message_received event.
onBật (true) hoặc tắt (false)booleancótrue shows the typing indicator, false hides it.

Field thêm: bỏ qua.

Output

FieldNhãnKiểuMô tả
recipient_idMã người nhận (PSID)string