有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java无法将用户添加到自定义访问群体中

我可以成功地创建一个空白的自定义观众,但当我尝试添加人时,我失败了。这很奇怪,因为我从facebook上收到了成功消息,但当我去power editor查看时,观众说“没有上传文件”。即使等了几个小时,什么也没发生

我尝试过使用当前迁移和10月1日迁移,对于当前迁移,我收到“true”,对于10月1日迁移,我收到一个audition_details对象,其num_received=9000(访问群体成员的数量)。有没有人经历过类似的问题?下面是我的代码和发送给fb的JSON

public Boolean addPeopleToAudience(String customAudienceId, JSONObject payloadJsonObject) throws FSSocialAuthException, JSONException {
    //october 1st migration (with return type CustomAudience class)
    //return getSessionClient().publish("/"+customAudienceId+"/users", CustomAudience.class, Parameter.with("payload", payloadJsonObject.toString()));

    //current migration (with return type Boolean)
    return getSessionClient().publish("/"+customAudienceId+"/", Boolean.class, Parameter.with("users", payloadJsonObject.get("users").toString()), Parameter.with("hash_type", "sha256"));
}

正在发送给FB的JsonObject:

{"users":"[{\"email_hash\":\"f1904cf1a9d73a55fa5de0ac8279\"},{\"email_hash\":\"f1904cf1a9d73a55fa50bdcd0866552bb79\"}...]}

在调用之前,json被转换为字符串,我从facebook得到“true”响应。 我已尝试在当前迁移中使用“/”+customAudienceId+“/users”端点,但收到oAuth错误

感谢您分享您的见解/经验


共 (1) 个答案

  1. # 1 楼答案

    应用内设置迁移,新迁移未打开。在使用新的迁移并打开它之后,它就可以工作了