2

有没有办法指定在“创建评论”API 调用的响应中检索哪些用户属性?

我是说:

“用户”:{

 "attributes":{
 }

}

我正在谈论的电话记录在这里: https ://docs.craftercms.org/en/3.0/developers/projects/social/api/v3/ugc/comments/create.html

4

1 回答 1

3

有一种方法可以设置系统范围的方法来控制为每个 API 返回的配置文件属性:

  • 编辑$TOMCAT_HOME/shared/classes/crafter/social/extension/server-config.properties
  • 添加studio.social.system.profileAgg.attributesToReturn=displayName,avatarLink,socialContexts,notificationLocale,autoWatch,defaultFrequency,isAlwaysAnonymous,ADD_HERE_ANY_EXTRA_ATTRIBUTES
  • 重新启动服务器。
于 2018-05-31T19:40:16.150 回答