I'm trying to get leads and filter them by lead ID or field_data. I'm using the Facebook NodeJS SDK but neither got it working in the GraphQL Explorer.

What's the issue? I want to filter leads by id or field_data but I'm getting An unknown error has occurred.

GraphQL query: 807167831236778 is the leadgen form ID is the Facebook lead ID

807167831236778/leads?fields=id&filtering=[{"field":"id","operator":"EQUAL","value":"346632491054423"}]

NodeJS SDK

const params = {   // trying to filter a specific lead id   'filtering' : [{'field':'id','operator':'EQUAL','value':'123456'}], }; const leadgenFormLeads = await (new LeadgenForm(form.id)).getLeads([                 Lead.Fields.campaign_name,                 Lead.Fields.created_time,                 Lead.Fields.field_data,                 Lead.Fields.form_id             ], params).then((result) => result.map((lead) => lead._data)) 

Tag:node.js, facebook-graph-api

Add a new comment.