A union of curiosity and data science

Knowledgebase and brain dump of a database engineer


C# Query Facebook Insights API

using System.Net;
 
string request_url = "https://graph.facebook.com/v2.8/<account_id>/insights?fields=actions,account_name,ad_name,ad_id&time_range={'since':'2016-10-20','until':'2016-10-20'}&format=json&access_token=<your token>
WebClient req = new WebClient();
Console.WriteLine(req.DownloadString(request_url));
Console.ReadKey();