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

Page Messenger Lead Forms

การอ่าน

Read all messenger_lead_forms owned by the page

ตัวอย่าง

Graph API Explorer
GET /v19.0/{page-id}/messenger_lead_forms HTTP/1.1
Host: graph.facebook.com
/* PHP SDK v5.0.0 */
/* make the API call */
try {
  // Returns a `Facebook\FacebookResponse` object
  $response = $fb->get(
    '/{page-id}/messenger_lead_forms',
    '{access-token}'
  );
} catch(Facebook\Exceptions\FacebookResponseException $e) {
  echo 'Graph returned an error: ' . $e->getMessage();
  exit;
} catch(Facebook\Exceptions\FacebookSDKException $e) {
  echo 'Facebook SDK returned an error: ' . $e->getMessage();
  exit;
}
$graphNode = $response->getGraphNode();
/* handle the result */
/* make the API call */
FB.api(
    "/{page-id}/messenger_lead_forms",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{page-id}/messenger_lead_forms",
    null,
    HttpMethod.GET,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
).executeAsync();
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                               initWithGraphPath:@"/{page-id}/messenger_lead_forms"
                                      parameters:params
                                      HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];
หากคุณต้องการเรียนรู้วิธีใช้ API กราฟ โปรดอ่านคู่มือการใช้ API กราฟของเรา

พารามิเตอร์

จุดสิ้นสุดนี้ไม่ต้องพารามิเตอร์ใดๆ

ช่อง

การอ่านจากจุดเชื่อมโยงนี้จะให้ผลลัพธ์ที่อยู่ในรูปแบบ JSON:

{ "data": [], "paging": {} }

data

รายชื่อของโหนด MessengerAdsPartialAutomatedStepList

paging

หากต้องการทราบข้อมูลเพิ่มเติมเกี่ยวกับการแบ่งหน้า โปรดดูคำแนะนำ API กราฟ

Error Codes

ข้อผิดพลาดคำอธิบาย
210User not visible

การสร้าง

You can make a POST request to messenger_lead_forms edge from the following paths:
When posting to this edge, a Page will be created.

พารามิเตอร์

พารามิเตอร์คำอธิบาย
account_id
int64

ID of the account

block_send_api
boolean

Whether to block messages sent using Send API while user is in Lead Gen Experience

handover_app_id
int64

Hand over thread to specified app after leadgen is complete

handover_summary
boolean

Opt-in to get a summary message sent to the target HOP app at the end of the automated flow

privacy_url
URI

Privacy URL for Messenger Lead Gen Experience

reminder_text
string

Reminder text that will be sent to user after inactivity

step_list
array<JSON object>

List of steps in Messenger Lead Gen Experience

ต้องระบุ
step_id
int64

step_id

ต้องระบุ
message
string

message

ต้องระบุ
step_type
enum {QUESTION, CONFIRMATION, DISCLAIMER, DISQUALIFY, INFO, INTRO, SUMMARY, POST_LEAD_TRANSITION}

step_type

ต้องระบุ
reply_type
enum {QUICK_REPLIES, TEXT, NONE, PREFILL, ICE_BREAKERS, APPOINTMENT, SUBSCRIBE, CALL_PREFERENCE, CONDITIONAL_ANSWER}

reply_type

ต้องระบุ
answers
array<string>
ค่าเริ่มต้น: []

answers

next_step_ids
array<int64>
ค่าเริ่มต้น: []

next_step_ids

prefill_type
enum {FULL_ADDRESS, STREET_ADDRESS, ZIP_CODE, POST_CODE, CITY, STATE, PROVINCE, COUNTRY, EMAIL, PHONE, PHONE_OTP, JOB_TITLE, COMPANY_NAME, GENDER, DOB, DATE_TIME, SLIDER, NONE, FIRST_NAME, LAST_NAME, FULL_NAME, RELATIONSHIP_STATUS, MARITAL_STATUS, MILITARY_STATUS, WORK_EMAIL, WORK_PHONE, NATIONAL_ID_BRAZIL, NATIONAL_ID_ARGENTINA, NATIONAL_ID_PERU, NATIONAL_ID_CHILE, NATIONAL_ID_COLOMBIA, NATIONAL_ID_ECUADOR, NATIONAL_ID_MEXICO}
ค่าเริ่มต้น: "NONE"

prefill_type

crm_field_id
string

crm_field_id

answer_crm_field_ids
array<string>
ค่าเริ่มต้น: []

answer_crm_field_ids

media_type
enum {TEXT, IMAGE, VIDEO}

media_type

media_content
string

media_content

options_format
enum {TEXT, CAROUSEL}
ค่าเริ่มต้น: "TEXT"

options_format

carousel_answers
array<JSON object>
ค่าเริ่มต้น: []

carousel_answers

value
string

value

ต้องระบุ
media_content
string

media_content

ต้องระบุ
answer_validation_enabled
boolean

answer_validation_enabled

invalid_reply_text
string

invalid_reply_text

cta
JSON object

cta

cta_type
enum {VIEW_WEBSITE, CALL_BUSINESS, MESSAGE_BUSINESS, DOWNLOAD, SCHEDULE_APPOINTMENT, VIEW_ON_FACEBOOK, PROMO_CODE, NONE}

cta_type

ต้องระบุ
cta_text
string

cta_text

ต้องระบุ
cta_content
string

cta_content

ต้องระบุ
allow_to_skip
boolean

allow_to_skip

qualifying_answers_list
array<string>

qualifying_answers_list

next_step_on_disqualification_id
int64

next_step_on_disqualification_id

offer_code_file_id
int64

offer_code_file_id

offer_code
string

offer_code

offer_code_format
string

offer_code_format

stop_question_message
string

Confirmation message after user clicks on the Stop Question option in persistent menu

template_name
string

Name for the form

tracking_parameters
JSON object {string : string}

Tracking Parameters of Lead Forms

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

This endpoint supports read-after-write and will read the node represented by id in the return type.
Struct {
id: numeric string,
}

Error Codes

ข้อผิดพลาดคำอธิบาย
100Invalid parameter
200Permissions error
368The action attempted has been deemed abusive or is otherwise disallowed

กำลังอัพเดต

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

กำลังลบ

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