使用FB的Java SDK创建和添加用户后获取Facebook自定义受众见解 [英] Fetching facebook custom audience insights after creating and adding users using fb's Java sdk

查看:139
本文介绍了使用FB的Java SDK创建和添加用户后获取Facebook自定义受众见解的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 facebook的Java API 创建了自定义受众并上传了我的数据由android mobile_adv_ids组成.

I used facebook's java api to create a custom audience and uploaded my data comprising of 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(); 

我可以在

https://www.facebook. com/ads/manager/audiences/manage/?act = xxxxxxx& pid = p1

以及关于

https://www.facebook. com/ads/audience-insights/people?act = xxxxxxx& age = 18- 但我找不到API来读取代码中的见解.

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://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();

谢谢.

推荐答案

相应的API称为受众研究

The corresponding API is called Audience Study https://developers.facebook.com/docs/marketing-api/audience-insights-api/audience-studies/v2.9

但是,Java SDK本身不支持它,因此您必须自己构造请求.请参见 https://github.com /facebook/facebook-java-ads-sdk/blob/master/examples/AdhocAPIRequestExample.java

However, it is not natively supported in Java SDK yet and you have to construct the request by yourself. See example in https://github.com/facebook/facebook-java-ads-sdk/blob/master/examples/AdhocAPIRequestExample.java

这篇关于使用FB的Java SDK创建和添加用户后获取Facebook自定义受众见解的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆