Posts tagged with facebook-graph-api

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)) 

Currently in the developing stages of a web app that will allow users to connect their Instagram & Facebook via OAuth then enable an automation that will send new IG posts to their Facebook.

Is there an IG Graph Webhook available for this? Or will I need to set up an API call from my app to watch for the new posts.

I also have an app created & verified with Meta already as a business app. I'm wondering if this was the right decision to create it as a business or should it be a consumer app.

When subscribing to a webhook, I was not able to locate anything to subscribe to 'new posts'.

If the next option is to set up an API call to watch for new posts for every 'x' amount of minutes is there an endpoint and headers that is provided in the docs to set this up?

Any other avenues on how to successfully get this feature up would be greatly appreciated!