Batch Requests for Insights on Facebook Marketing API (JAVA) -


this should easy looking @ fb documentation marketing api page empty: https://developers.facebook.com/docs/marketing-api/asyncrequests/v2.10

does has simple example on how make easy batch request adsinsights ads, adsets or campaigns?

googling around find examples in js or python, can't seem find right class name in java this.

ok, got working. code in scala should same in java.

implicit val batch = new batchrequest(facebookapi.context) apinodelist.asscala.map(getinsights)  def getinsights(node: ad)(implicit data: insightdata, batch: batchrequest) = {     node.getinsights       .setbreakdowns(data.breakdowns)       .setdatepreset(data.datepreset.tostring)       .setfields(data.fields)       .setactionattributionwindows(data.attributionwindow)       .settimeincrement(data.timeincrement)       .addtobatch(batch) }  val result = batch.execute() 

Comments

Popular posts from this blog

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -