Google Business Profile位置API如何配置readMask返回商家照片
解答
在现有readMask的字段列表末尾追加photos即可让接口同步返回商家照片数据。
修改后的代码示例:
let readMask = "storeCode,name,languageCode,title,phoneNumbers,categories,storefrontAddress,websiteUri,regularHours,specialHours,serviceArea,labels,adWordsLocationExtensions,latlng,openInfo,metadata,profile,relationshipData,moreHours,photos"; let url = `https://mybusinessbusinessinformation.googleapis.com/v1/accounts/${account.id}/locations?readMask=${readMask}`;
注意事项
photos是该v1版本接口Location资源的合法字段,加入后返回的照片数据覆盖商家LOGO、封面图、门店实拍、产品图等所有绑定到该位置的图片资源,每条数据包含图片访问地址、尺寸、分类、上传信息等元内容。- 字段名严格区分大小写,与其他字段用英文逗号分隔即可,无需额外配置其他参数。
内容的提问来源于stack exchange,提问作者ololo
相关产品推荐
相关产品推荐

