Marketing API Version

User Lead Gen Info

Reading

A LeadGen submission by a user via a Feed Ad unit

Permissions

Developers usually request these permissions for this endpoint:

Marketing Apps
  • ads_management
  • manage_pages
  • pages_show_list
Page management Apps
  • manage_pages
  • pages_show_list
Other Apps
No data

Example

Graph API Explorer
GET /v2.12/{user-lead-gen-info-id} 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(
    '/{user-lead-gen-info-id}',
    '{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(
    "/{user-lead-gen-info-id}",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{user-lead-gen-info-id}",
    null,
    HttpMethod.GET,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
).executeAsync();
// For more complex open graph stories, use `FBSDKShareAPI`
// with `FBSDKShareOpenGraphContent`
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                               initWithGraphPath:@"/{user-lead-gen-info-id}"
                                      parameters:params
                                      HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];
If you want to learn how to use the Graph API, read our Using Graph API guide.

Parameters

This endpoint doesn't have any parameters.

Fields

FieldDescription

created_time

datetime

Time this object was created

id

numeric string

ID of the LeadGenInfo object

ad_id

numeric string

Ad ID for the Lead Ad

ad_name

string

Ad name for the Lead Ad

adset_id

numeric string

Ad Set ID for the Lead Ad

adset_name

string

Ad Set name for the Lead Ad

campaign_id

numeric string

Campaign ID for the Lead Ad

campaign_name

string

Campaign name for the Lead Ad

custom_disclaimer_responses

list<UserLeadGenDisclaimerResponse>

User responses to custom disclaimers

field_data

list<UserLeadGenFieldData>

Data submitted by the user

form_id

numeric string

Form ID used for the Lead Ads

is_organic

bool

Indicates whether the lead is organic

post

Post used for the LeadGen Ad unit

retailer_item_id

string

User selected retailer item id

Edges

No edges

Validation Rules

ErrorDescription
100Invalid parameter
200Permissions error

Creating

You can't perform this operation on this endpoint.

Updating

You can't perform this operation on this endpoint.

Deleting

You can delete a UserLeadGenInfo by making a DELETE request to /{user_lead_gen_info_id}.

Parameters

This endpoint doesn't have any parameters.

Return Type

Struct {
success: bool,
}

Validation Rules

ErrorDescription
110Invalid user id