เวอร์ชันของ API กราฟ

Page Messages

The PageMessages endpoint allows your business to send a message to a customer from your Facebook Page in response to a message received from the customer.

การอ่าน

คุณไม่สามารถดำเนินการนี้ที่ปลายทางนี้

การสร้าง

You can make a POST request to messages edge from the following paths:
When posting to this edge, no Graph object will be created.

พารามิเตอร์

พารามิเตอร์คำอธิบาย
message
Object

Information about the message including the message ID, type, and contents

รองรับอีโมจิ
text
UTF-8 string

รองรับอีโมจิ
dynamic_text
Object

รองรับอีโมจิ
text
UTF-8 string

ต้องระบุรองรับอีโมจิ
fallback_text
UTF-8 string

รองรับอีโมจิ
attachment
Object

รองรับอีโมจิ
type
enum {IMAGE, VIDEO, AUDIO, FILE, LOCATION, TEMPLATE, FALLBACK, REEL, IG_REEL, LIKE_HEART, MEDIA_SHARE}

ต้องระบุ
payload
string

รองรับอีโมจิ
quick_reply_type
string

quick_replies
list<Object>

รองรับอีโมจิ
title
UTF-8 string

รองรับอีโมจิ
content_type
enum {LOCATION, USER_PHONE_NUMBER, USER_EMAIL, USER_CITY, USER_BIRTHDAY, USER_STATE, USER_ZIP_CODE, OPEN_CAMERA, OPEN_GALLERY, RECORD_AUDIO, POLL, TEXT, OPEN_NATIVE, STICKER, OPEN_APP, P2P_PAYMENT, TRANSPORTATION, CREATE_EVENT, GIF, BIC_OPT_IN, DISPLAY_PERSISTENT_MENU, BUSINESS_LEAD_FORM}

ต้องระบุ
image_url
URL

data
Object

app
string

dest_address
string

sticker_id
numeric string or integer

payment_amount
integer

payment_currency
ISO 4217 Currency Code

payment_type
enum{pay, request}

poll_options
list<string>

provider_name
string

native_uri
string

payload
UTF-8 string

รองรับอีโมจิ
template
Object

name
string

ต้องระบุ
language
Object

ต้องระบุ
code
string

ต้องระบุ
components
list<Object>

รองรับอีโมจิ
type
enum {HEADER, BODY, TITLE, BUTTONS}

ต้องระบุ
parameters
list<Object>

รองรับอีโมจิ
type
string

ต้องระบุ
text
string

payload
string

url
string

metadata
string

messaging_type
enum {RESPONSE, UPDATE, MESSAGE_TAG, UTILITY}

The type of message you are sending.

  • MESSAGE_TAG – A non-promotional message that is being sent outside the 24-hour messaging window with a message tag.
  • RESPONSE – A response to a received message. This includes promotional and non-promotional messages sent inside the 24-hour messaging window.
  • UPDATE – A message that is not in response to a received message. This includes promotional and non-promotional messages sent inside the 24-hour messaging window.

notification_type
enum {REGULAR, SILENT_PUSH, NO_PUSH}
ค่าเริ่มต้น: REGULAR

The type of push notification the customer receives when your message is delivered

payload
string

Payload of the sender action

รองรับอีโมจิ
persona_id
numeric string

The ID for your business persona

recipient
Object

The customer receiving your message. An example object is { "id": "PSID" }

ต้องระบุ
id
numeric string

phone_number
string

name
Object

first_name
string

last_name
string

user_ref
string

comment_id

post_id
string

player_id
numeric string

one_time_notif_token
string

notification_messages_token
string

login_id
string

sender_action
enum {MARK_SEEN, TYPING_ON, TYPING_OFF, REACT, UNREACT}

The action displayed to a customer to let the customer know that you have seen and are processing their message.

  • MARK_SEEN – Indicates that you have received the customer's message
  • REACT – Indicates that you have reacted to the customer's message
  • TYPING_OFF – Turns off the typing indicator
  • TYPING_ON – Indicates that you are typing a response to the customer's message. Automatically turns off after 20 seconds or after a response is sent
  • UNREACT – Indicates that you have removed a reaction to the customer's message

tag
Message tag

A tag to allow your app to send a personalized message to a customer outside the 24-hour messaging window.

  • ACCOUNT_UPDATE – For a non-recurring message sent to a customer containing a change to the customer's application or account.
  • CONFIRMED_EVENT_UPDATE – For a reminder or update for an event that a customer has registered for (RSVP'ed, purchased tickets). The message can be sent for upcoming events and events in progress.
  • CUSTOMER_FEEDBACK – For a message sent to a customer containing the Customer Feedback Template. The message can be sent within 7 days after the customer's last message.
  • HUMAN_AGENT – For a message sent to a customer from a human agent in response to the customer's inquiries. The message can be sent within 7 days after a customer's last message.
  • POST_PURCHASE_UPDATE – For a message sent to a customer containing an update about the customer's recent purchase.

Only HUMAN_AGENT is available for Instagram Messaging.

ประเภทการส่งกลับ

This endpoint supports read-after-write and will read the node to which you POSTed.
Struct {
recipient_id: string,
message_id: string,
attachment_id: string,
}

Error Codes

ข้อผิดพลาดคำอธิบาย
551This person isn't available right now.
100Invalid parameter
2022The ability to send commerce messages has been temporarily disabled for this application.
613Calls to this api have exceeded the rate limit.
190Invalid OAuth 2.0 Access Token
10903This user cant reply to this activity
200Permissions error
10900Activity already replied to
10901Activity replying time expired
194Missing at least one required parameter

กำลังอัพเดต

คุณไม่สามารถดำเนินการนี้ที่ปลายทางนี้

กำลังลบ

คุณไม่สามารถดำเนินการนี้ที่ปลายทางนี้