您可以获取业务资产组中的资产、向业务资产组添加资产以及从业务资产组中删除资产。资产包括广告账户、公共主页、Facebook Pixel 像素代码、线下事件集、应用、目录、Instagram 账户和自定义转化事件。
管理企业的资产组,并了解如何关联您的企业用户与资产组。业务资产组有助于大型广告主或代理商高效地管理企业中的用户和资产。您应该以与实际业务对应的方式来组织资产和用户。例如,企业可以根据品牌、地区、客户或其自行选择的组织原则来组织其资产和用户。
如要获取业务资产组中 Facebook 公共主页的完整清单,请执行以下调用:
curl -i -X GET \ "https://graph.facebook.com/<API_VERSION>/<BUSINESS_ASSET_GROUP_ID>/contained_pages?access_token=<ACCESS_TOKEN>"
响应如下所示:
{ "data": [ { "name": "Sample Name", "id": "<ID>" }, { "name": "Another Name", "id": "<ID>" }, { "name": "Third Name", "id": "<ID>" } ], .... }
您可以将公共主页添加到业务资产组,可添加您拥有的或与您分享的公共主页:
curl -i -X POST \ "https://graph.facebook.com/<API_VERSION>/<BUSINESS_ASSET_GROUP_ID>/contained_pages?asset_id=<PAGE_ID>&access_token=<ACCESS_TOKEN>"
成功后,我们会返回 true
。
如要从业务资产组中移除公共主页,请执行以下调用:
curl -i -X DELETE \ "https://graph.facebook.com/<API_VERSION>/<BUSINESS_ASSET_GROUP_ID>/contained_pages?asset_id=<PAGE_ID>&access_token=<ACCESS_TOKEN>"
成功后,我们会返回 true
。
业务资产组可以包含拥有的或共享的广告账户。如要查看小组中的所有账户,请执行以下调用:
curl -i -X GET \ "https://graph.facebook.com/<API_VERSION>/<BUSINESS_ASSET_GROUP_ID>/contained_adaccounts?access_token=<ACCESS_TOKEN>"
响应如下所示:
{ "data": [ { "account_id": "<ID>", "id": "act_<ID>" }, { "account_id": "<ID>", "id": "act_<ID>" }, { "account_id": "<ID>", "id": "act_<ID>" } ], .... } } }
如要将广告账户添加到业务资产组,请执行以下调用:
curl -i -X POST \ "https://graph.facebook.com/<API_VERSION>/<BUSINESS_ASSET_GROUP_ID>/contained_adaccounts?asset_id=<AD_ACCOUNT_ID>&access_token=<ACCESS_TOKEN>"
如要从业务资产组移除广告账户,请执行以下调用:
curl -i -X DELETE \ "https://graph.facebook.com/<API_VERSION>/<BUSINESS_ASSET_GROUP_ID>/contained_adaccounts?asset_id=<AD_ACCOUNT_ID>&access_token=<ACCESS_TOKEN>"
您可以将拥有的或分享的商品目录添加到业务资产组。如要查看小组中的所有目录,请执行以下调用:
curl -i -X GET \ "https://graph.facebook.com/<API_VERSION>/<BUSINESS_ASSET_GROUP_ID>/contained_product_catalogs?access_token=<ACCESS_TOKEN>"
响应如下所示:
{ "data": [ { "id": "<ID>", "name": "1 product catalog" }, { "id": "<ID>", "name": "First_Catalog_Products" } ], .... }
如要将目录添加到业务资产组,请执行以下调用:
curl -i -X POST \ "https://graph.facebook.com/<API_VERSION>/<BUSINESS_ASSET_GROUP_ID>/contained_product_catalogs?asset_id=<CATALOG_ID>&access_token=<ACCESS_TOKEN>"
成功后,我们会返回 true
。如要从业务资产组中移除目录,请执行以下调用:
curl -i -X DELETE \ "https://graph.facebook.com/<API_VERSION>/<BUSINESS_ASSET_GROUP_ID>/contained_product_catalogs?asset_id=<CATALOG_ID>&access_token=<ACCESS_TOKEN>"
您可以将分享的或拥有的 Instagram 账户添加到业务资产组。如要获取现有账户的清单,请执行以下调用:
curl -i -X GET \ "https://graph.facebook.com/<API_VERSION>/<BUSINESS_ASSET_GROUP_ID>/contained_instagram_accounts?access_token=<ACCESS_TOKEN>"
响应如下所示:
{ "data": [ { "id": "<ID>" }, { "id": "<ID>" } ], .... }
如要将 Instagram 账户添加到业务资产组,请执行以下调用:
curl -i -X POST \ "https://graph.facebook.com/<API_VERSION>/<BUSINESS_ASSET_GROUP_ID>/contained_instagram_accounts?asset_id=<INSTAGRAM_ACCOUNT_ID>&access_token=<ACCESS_TOKEN>"
成功后,我们会返回 true
。
如要从业务资产组中移除账户,请执行以下调用:
curl -i -X DELETE \ "https://graph.facebook.com/<API_VERSION>/<BUSINESS_ASSET_GROUP_ID>/contained_instagram_accounts?asset_id=<ID>&access_token=<ACCESS_TOKEN>"
您可以在业务资产组中添加或移除拥有的和分享的 Pixel 像素代码。如要查看业务资产组中的所有现有 Pixel 像素代码,请执行以下调用:
curl -i -X GET \ "https://graph.facebook.com/<API_VERSION>/<BUSINESS_ASSET_GROUP_ID>/contained_pixels?access_token=<ACCESS_TOKEN>"
响应如下所示:
{ "data": [ { "id": "<ID>" }, { "id": "<ID>" } ], .... } } }
如要将 Pixel 像素代码添加到业务资产组,请执行以下调用:
curl -i -X POST \ "https://graph.facebook.com/<API_VERSION>/<BUSINESS_ASSET_GROUP_ID>/contained_pixels?asset_id=<PIXEL_ID>&access_token=<ACCESS_TOKEN>"
成功后,我们会返回 true
。
如要从业务资产组中移除 Pixel 像素代码,请执行以下调用:
curl -i -X DELETE \ "https://graph.facebook.com/<API_VERSION>/<BUSINESS_ASSET_GROUP_ID>/contained_pixels?asset_id=<PIXEL_ID>&access_token=<ACCESS_TOKEN>"
业务资产组可以同时包含共享的和拥有的线下事件数据集。如要查看业务资产组中的所有数据集,请执行以下调用:
curl -i -X GET \ "https://graph.facebook.com/<API_VERSION>/<BUSINESS_ASSET_GROUP_ID>/contained_offline_conversion_data_sets?access_token=<ACCESS_TOKEN>"
响应如下所示:
{ "data": [ { "id": "<ID>", "name": "Transfer", "business": { "id": "<ID>", "name": "Acme Industries Inc." }, "enable_auto_assign_to_accounts": false, "is_restricted_use": false }, { "id": "<ID>", "name": "Default Offline Event Set For Biz1", "business": { "id": "<ID>", "name": "Biz1" }, "enable_auto_assign_to_accounts": true, "is_restricted_use": false } ], .... }
如要将线下事件集添加到业务资产组,请执行以下调用:
curl -i -X POST \ "https://graph.facebook.com/<API_VERSION>/<BUSINESS_ASSET_GROUP_ID>/contained_offline_conversion_data_sets?asset_id=<EVENT_SET_ID>&access_token=<ACCESS_TOKEN>"
成功后,我们会返回 true
。
如要从业务资产组移除事件集,请执行以下调用:
curl -i -X DELETE \ "https://graph.facebook.com/<API_VERSION>/<BUSINESS_ASSET_GROUP_ID>/contained_offline_conversion_data_sets?asset_id=<EVENT_SET_ID>&access_token=<ACCESS_TOKEN>"
如要获取业务资产组中所有分享的和拥有的应用,请执行以下调用:
curl -i -X GET \ "https://graph.facebook.com/<API_VERSION>/<BUSINESS_ASSET_GROUP_ID>/contained_applications?access_token=<ACCESS_TOKEN>"
响应:
{ "data": [ { "category": "Games", "link": "/instantgames/<ID>/", "name": "testing again", "id": "<ID>" }, { "category": "Lifestyle", "link": "https://www.facebook.com/games/?app_id=<ID>", "name": "AccountKitTest", "id": "<ID>" } ], .... }
如要将应用添加到业务资产组,请执行以下调用:
curl -i -X POST \ "https://graph.facebook.com/<API_VERSION>/<BUSINESS_ASSET_GROUP_ID>/contained_applications?asset_id=<APP_ID>&access_token=<ACCESS_TOKEN>"
如要从业务资产组移除账户,请执行以下调用:
curl -i -X DELETE \ "https://graph.facebook.com/<API_VERSION>/<BUSINESS_ASSET_GROUP_ID>/contained_applications?asset_id=<APP_ID>&access_token=<ACCESS_TOKEN>"
您成功添加或移除应用时,我们会返回 true
。
如要查看业务资产组中所有拥有的和分享的自定义转化事件数据集,请执行以下调用:
curl -i -X GET \ "https://graph.facebook.com/<API_VERSION>/<BUSINESS_ASSET_GROUP_ID>/contained_custom_conversions?access_token=<ACCESS_TOKEN>"
响应:
{ "data": [{ "data": [ { "id": "<ID>" }, { "id": "<ID>" } ], .... }
如要将自定义转化事件添加到业务资产组,请执行以下调用:
curl -i -X POST \ "https://graph.facebook.com/<API_VERSION>/<BUSINESS_ASSET_GROUP_ID>/contained_custom_conversions?asset_id=<CUSTOM_CONVERSIONS_DATA_SET_ID>&access_token=<ACCESS_TOKEN>"
如要从业务资产组删除自定义转化事件,请执行以下调用:
curl -i -X DELETE \ "https://graph.facebook.com/<API_VERSION>/<BUSINESS_ASSET_GROUP_ID>/contained_custom_conversions?asset_id=<CUSTOM_CONVERSIONS_DATA_SET_ID>&access_token=<ACCESS_TOKEN>"
您成功添加或移除自定义转化事件时,我们会返回 true
。