图谱 API 版

Whats App Business Account Product Catalogs

读取

Returns the product catalog connected to the WhatsApp Business Account

Example

Requirements

  • whatsapp_business_management permission

  • whatsapp_business_messaging permission

  • catalog_management permission

  • public_profile permission

  • WHATSAPP BUSINESS ACCOUNT ID

  • USER ACCESS TOKEN

Request

curl -i -X GET \
 "https://graph.facebook.com/LATEST-VERSION/WHATSAPP-BUSINESS-ACCOUNT-ID/product_catalogs?access_token=USERS-ACCESS-TOKEN"
GraphRequest request = GraphRequest.newGraphPathRequest(
  accessToken,
  "/WHATSAPP-BUSINESS-ACCOUNT-ID/product_catalogs",
  new GraphRequest.Callback() {
    @Override
    public void onCompleted(GraphResponse response) {
      // Insert your code here
    }
});

request.executeAsync();
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
    initWithGraphPath:@"/WHATSAPP-BUSINESS-ACCOUNT-ID/product_catalogs"
           parameters:nil
           HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection, id result, NSError *error) {
    // Insert your code here
}];

Response

{
  "data": [
  ]
}

参数

这个端点不包含任何参数。

字段

从这条连线读取将返回一个 JSON 格式的结果:

{ "data": [], "paging": {} }

data

ProductCatalog 节点列表。

paging

详细了解分页功能,请见图谱 API 指南

错误代码

错误描述
200Permissions error
100Invalid parameter

创建

你可以通过下列路径向 product_catalogs 连线发出 POST 请求:
When posting to this edge, no Graph object will be created.

参数

参数描述
catalog_id
numeric string

catalog_id

必填

返回类型

Struct {
success: bool,
}

错误代码

错误描述
100Invalid parameter

更新

你无法在此端点执行该操作。

删除

你无法在此端点执行该操作。