I have successfully created .net application for getting the leads from facebook using graph api.
These are the two URLs I am using:
https://graph.facebook.com/v16.0/{form-id}/leads?access_token={access-token}&limit=1000
First one is returning list of active forms, and second is returning a list of leads for a specific form id.
Now I have somehow to link form/lead with the campaign, adset and ad, so I need some help. I am able to call this https://graph.facebook.com/v16.0/act_{ad-account-id}/ads?access_token={access-token}&fields=name,campaign_id,adset_id so I can get aforementioned data, but I am not sure how to connect those data with forms data...
I have managed to do it, hope it will help someone with similar problem because the facebook docs is awful...
I came to this solution after a lot of reading and constant try and fail... This is the URL which is returning the data about leads (Q&A), campaign, adset and ads.
This is the preview of the response: