简体   繁体   English

在使用fb的Java sdk创建和添加用户后获取Facebook自定义受众洞察

[英]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.

相关问题 如何使用Java FB Business SDK获得Facebook广告帐户的转化? - How to get a Facebook Ad Account's Conversions using the Java FB Business SDK? 使用RestFB在Facebook上获取用户的私人消息 - Fetching Private Messages of users on Facebook using RestFB 使用API​​的Facebook Marketing API自定义网站受众定位 - Facebook marketing API custom website audience targeting using API 使用facebook获取facebook好友 java api - Fetching facebook friends by using facebook java api 在Android上使用Java创建FB应用 - Creating a FB App using java on android 使用Java和Jersey客户端向Mailchimp受众添加新订户 - Adding a new subscriber to a Mailchimp audience using Java and a Jersey Client 使用AWS Java SDK获取CloudWatch指标? - Fetching CloudWatch metrics using the AWS Java SDK? Facebook SDK Java-使用LoginButton添加扩展权限 - Facebook sdk Java - adding extended permissions with LoginButton Eror在ConstrantLayout上添加了Facebook受众网络横幅 - Eror adding facebook audience network banner on ConstrantLayout Azure Application Insights 在使用 Java 8 和应用程序洞察力 SDK 1.0.8 版时不显示实时指标 - Azure Application Insights doesn't show live metrics when using Java 8 and application insights SDK version 1.0.8
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM