管理企业的资产组,并了解如何关联您的企业用户与资产组。业务资产组有助于大型广告主或代理商高效地管理企业中的用户和资产。您应该以与实际业务对应的方式来组织资产和用户。例如,企业可以根据品牌、地区、客户或其自行选择的组织原则来组织其资产和用户。
业务资产组可以包含广告账户、公共主页、Facebook Pixel 像素代码、线下事件集、应用、目录、自定义转化事件和 Instagram 账户。这些资产可以由企业所有,也可以进行分享,以便向代理商授予资产的访问权限。
如需获取与企业关联的资产组清单,请向 BusinessBusinessAssetGroups
端点发送 GET
请求。
curl -i -X GET "https://graph.facebook.com/<API_VERSION>/<BUSINESS_ID>/business_asset_groups ?access_token=<ACCESS_TOKEN>"
{ "data": [ { "id": "BUSINESS-ID", "name": "Northern Region" }, { "id": "BUSINESS-ID", "name": "Western Region" } ], .... }
如需详细了解某个特定业务资产组,请向 BusinessAssetGroup
端点发送 GET
请求。
curl -i -X GET "https://graph.facebook.com/<API_VERSION>/<BUSINESS_ASSET_GROUP_ID> ?access_token=<ACCESS_TOKEN>"
{ "id": "BUSINESS-ASSET-GROUP-ID", "name": "BUSINESS-ASSET-GROUP-NAME" }
如需重命名特定资产组,请向 BusinessAssetGroup
端点发送 POST
请求,并将 name
设置为新值。
curl -i -X POST "https://graph.facebook.com/<API_VERSION>/<BUSINESS_ASSET_GROUP_ID> ?name=BUSINESS-ASSET-GROUP-NAME &access_token=<ACCESS_TOKEN>"
"success": "true"
如需删除特定资产组,请向 BusinessAssetGroup
端点发送 DELETE
请求。
curl -i -X DELETE "https://graph.facebook.com/<API_VERSION>/<BUSINESS_ASSET_GROUP_ID> ?access_token=<ACCESS_TOKEN>"
"success": "true"
拥有企业身份(已认领应用)的用户的公开用户字段。
请参阅“业务资产用户个人主页访问权限”参考文档,获取可读取的用户字段清单。
如需查看企业范围用户可以访问的所有业务资产组清单,请向 BusinessScopedUser/AssignedBusinessAssetGroups
端点发送 GET
请求。
curl -i -X GET "https://graph.facebook.com/<API_VERSION>/<BUSINESS_SCOPED_USER_ID>/assigned_business_asset_groups ?limit=1 &access_token=<ACCESS_TOKEN>"
响应包含用户身份,该身份会定义用户对每种资产类型的访问权限级别:
{ "data": [ { "id": "BUSINESS-ID" "name": "USER NAME", "page_roles": [ "ANALYZE", "ADVERTISE" ], "offline_conversion_data_set_roles": ["UPLOAD"], "adaccount_roles": ["ANALYZE", "ADVERTISE"], "pixel_roles": ["ANALYZE", "EDIT"] } ], .... }
如需了解资产组的获分配用户名单,请向 BusinessAssetGroupAssignedUsers
端点发送 GET
请求。
curl -i -X GET "https://graph.facebook.com/<API_VERSION>/<BUSINESS_ASSET_GROUP_ID>/assigned_users ?limit=2 &business=<BUSINESS_ID> &access_token=<ACCESS_TOKEN>"
{ "data": [ { "id": "BUSINESS-ID", "name": "Dabney Donigan", "page_roles": [ "ANALYZE" ], "offline_conversion_data_set_roles": [ "ADVERTISE", "UPLOAD", "MANAGE" ], "adaccount_roles": [ "ANALYZE" ], "pixel_roles": [ "ANALYZE", "EDIT" ] } ], .... }
如需将用户分配到业务资产组,请向 BusinessAssetGroupAssignedUsers
端点发送 POST
请求。
curl -i -X POST "https://graph.facebook.com/<API_VERSION>/<BUSINESS_ASSET_GROUP_ID>/assigned_users ?business=<BUSINESS_ID> &user=USER-ID &page_roles=LIST-OF-PAGE-ROLES &adaccount_roles=LIST-OF-AD-ACCOUNT-ROLES &pixel_roles=LIST-OF-PIXEL-ROLES &offline_conversion_data_set_roles=LIST-OF-OFFLINE-CONVERSION-ROLES &access_token=<ACCESS_TOKEN>"
"success": "true"
如需移除组中的用户,请向 BusinessAssetGroup
端点发送 POST
请求。
curl -i -X DELETE \ "https://graph.facebook.com/<API_VERSION>/<BUSINESS_ASSET_GROUP_ID>/assigned_users ?business=<BUSINESS_ID> &user=<USER_ID> &access_token=<ACCESS_TOKEN>"
"success": "true"