Read all messenger_lead_forms owned by the page
GET /v21.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
}];
La lectura de este perímetro mostrará un resultado con formato JSON:
{ "
data
": [], "paging
": {} }
data
paging
Error | Descripción |
---|---|
200 | Permissions error |
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 |
100 | Invalid parameter |
210 | User not visible |
190 | Invalid OAuth 2.0 Access Token |
messenger_lead_forms
edge from the following paths: Parámetro | Descripción |
---|---|
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 Obligatorio |
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 |
id
in the return type.id
: numeric string, Error | Descripción |
---|---|
100 | Invalid parameter |
368 | The action attempted has been deemed abusive or is otherwise disallowed |