Read all messenger_lead_forms owned by the page
GET /v24.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
}];このエッジからの読み込むではJSONフォーマットの結果が返されます:
{ "
data": [], "paging": {} }
datapaging| エラー | 詳細 |
|---|---|
| 283 | That action requires the extended permission pages_read_engagement and/or pages_read_user_content and/or pages_manage_ads and/or pages_manage_metadata |
| 80005 | There have been too many leadgen api calls to this Page account. Wait a bit and try again. For more info, please refer to https://developers.facebook.com/docs/graph-api/overview/rate-limiting. |
| 200 | Permissions error |
| 210 | User not visible |
| 190 | Invalid OAuth 2.0 Access Token |
| 100 | Invalid parameter |
messenger_lead_formsのエッジにPOSTリクエストを以下のパスで送信できます: | パラメーター | 説明 |
|---|---|
account_idint64 | ID of the account |
block_send_apiboolean | Whether to block messages sent using Send API while user is in Lead Gen Experience |
handover_app_idint64 | Hand over thread to specified app after leadgen is complete |
handover_summaryboolean | Opt-in to get a summary message sent to the target HOP app at the end of the automated flow |
privacy_urlURI | Privacy URL for Messenger Lead Gen Experience |
reminder_textstring | Reminder text that will be sent to user after inactivity |
step_listarray<JSON object> | List of steps in Messenger Lead Gen Experience 必須 |
step_idint64 | step_id 必須 |
messagestring | message 必須 |
step_typeenum {QUESTION, CONFIRMATION, DISCLAIMER, DISQUALIFY, INFO, INTRO, SUMMARY, POST_LEAD_TRANSITION} | step_type 必須 |
reply_typeenum {QUICK_REPLIES, BUTTON_XMA, TEXT, NONE, PREFILL, ICE_BREAKERS, APPOINTMENT, SUBSCRIBE, CALL_PREFERENCE, CONDITIONAL_ANSWER} | reply_type 必須 |
answersarray<string> | デフォルト値: []answers |
next_step_idsarray<int64> | デフォルト値: []next_step_ids |
prefill_typeenum {FULL_ADDRESS, STREET_ADDRESS, ZIP_CODE, POST_CODE, CITY, STATE, PROVINCE, COUNTRY, EMAIL, PHONE, 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_idstring | crm_field_id |
answer_crm_field_idsarray<string> | デフォルト値: []answer_crm_field_ids |
media_typeenum {TEXT, IMAGE, VIDEO} | media_type |
media_contentstring | media_content |
options_formatenum {TEXT, CAROUSEL} | デフォルト値: "TEXT"options_format |
carousel_answersarray<JSON object> | デフォルト値: []carousel_answers |
valuestring | value 必須 |
media_contentstring | media_content 必須 |
answer_validation_enabledboolean | answer_validation_enabled |
invalid_reply_textstring | invalid_reply_text |
ctaJSON object | cta |
cta_typeenum {VIEW_WEBSITE, CALL_BUSINESS, MESSAGE_BUSINESS, DOWNLOAD, SCHEDULE_APPOINTMENT, VIEW_ON_FACEBOOK, PROMO_CODE, NONE, WHATSAPP, P2B_MESSENGER, BOOK_ON_WEBSITE} | cta_type 必須 |
cta_textstring | cta_text 必須 |
cta_contentstring | cta_content 必須 |
allow_to_skipboolean | allow_to_skip |
qualifying_answers_listarray<string> | qualifying_answers_list |
next_step_on_disqualification_idint64 | next_step_on_disqualification_id |
offer_code_file_idint64 | offer_code_file_id |
offer_codestring | offer_code |
offer_code_formatstring | offer_code_format |
stop_question_messagestring | Confirmation message after user clicks on the Stop Question option in persistent menu |
template_namestring | Name for the form |
tracking_parametersJSON object {string : string} | Tracking Parameters of Lead Forms |
idによって表されたノードを戻り値の型で読み込みます。id: numeric string, | エラー | 詳細 |
|---|---|
| 100 | Invalid parameter |
| 368 | The action attempted has been deemed abusive or is otherwise disallowed |