[英]Fetching facebook custom audience insights after creating and adding users using fb's Java sdk
I used facebook's java api to create a custom audience and uploaded my data comprising of android mobile_adv_ids. 我用facebook的java api创建了一个自定义受众,并上传了包含android mobile_adv_ids的数据。
CustomAudience customAudience = new AdAccount(ACCOUNT_ID, context).createCustomAudience()
.setName("My new CA")
.setSubtype(CustomAudience.EnumSubtype.VALUE_CUSTOM)
.setDescription("People who bought from my website")
.execute();
User user = new CustomAudience(customAudience.getId(), context).createUser()
.setPayload("{\"schema\":\"MOBILE_ADVERTISER_ID\"," + payload.toString().substring(1, payload.toString().length()))
.execute();
I can see the data successfully uploaded on 我可以看到成功上传的数据
https://www.facebook.com/ads/manager/audiences/manage/?act=xxxxxxx&pid=p1 https://www.facebook.com/ads/manager/audiences/manage/?act=xxxxxxx&pid=p1
and insights on 和见解
https://www.facebook.com/ads/audience-insights/people?act=xxxxxxx&age=18- but I can't find the api to read the insights in code. https://www.facebook.com/ads/audience-insights/people?act=xxxxxxx&age=18-但我找不到api来阅读代码中的见解。
This is the code on https://developers.facebook.com/docs/marketing-api/reference/custom-audience/ available for reading. 这是https://developers.facebook.com/docs/marketing-api/reference/custom-audience/上的代码,可供阅读。
But how can I read audience insights data as % of male/female and other fields? 但是,如何将观众见解数据作为男/女和其他领域的百分比来阅读?
CustomAudience customAudience2 = new CustomAudience("xxxxxxxxx", context).get().execute();
Thanks. 谢谢。
The corresponding API is called Audience Study https://developers.facebook.com/docs/marketing-api/audience-insights-api/audience-studies/v2.9 相应的API称为受众研究https://developers.facebook.com/docs/marketing-api/audience-insights-api/audience-studies/v2.9
However, it is not natively supported in Java SDK yet and you have to construct the request by yourself. 但是,它尚未在Java SDK中本机支持,您必须自己构建请求。 See example in https://github.com/facebook/facebook-java-ads-sdk/blob/master/examples/AdhocAPIRequestExample.java
请参阅https://github.com/facebook/facebook-java-ads-sdk/blob/master/examples/AdhocAPIRequestExample.java中的示例
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.