php - 如何使用 Google My Business PHP 库更新现有位置?
问题描述
我连接和提取现有位置信息没有问题,但更新现有位置数据没有成功。
你们如何更新商店营业时间?
# library: https://github.com/spotonlive/php-google-my-business
# client and scope
$client = new Google_Client();
$client->useApplicationDefaultCredentials();
$client->setSubject("my@emailaddres.ca");
$client->addScope("https://www.googleapis.com/auth/plus.business.manage");
# service
$mybusinessService = new Google_Service_Mybusiness($client);
// Get locations
$account_name = "accounts/ACCOUNTNUMBERHERE";
$locations = $mybusinessService->accounts_locations;
$locations_list = $locations->listAccountsLocations($account_name)->getLocations();
// update website
$locations_list[0]->setWebsiteUrl("https://www.newwebsitehere.com");
解决方案
推荐阅读
- ios - 颤振构建 ios 与 admob 和 facebook 受众网络错误
- java - 如何从源代码安装 JRE?
- file - Ansible - 从远程机器上的文件中获取密钥对值并填充变量
- java - Spring Boot Elasticsearch Repository - @Id with Class 而不是 @Id with String
- c++ - “make”命令在终端 VScode 中不起作用
- javascript - 无法读取未定义 discord.js 警告命令的属性“发送”
- c# - ASP.Net 框架 MVC 实体 6 中的日期时间字段
- python-3.x - MongoDB 数据正在自动删除
- javascript - 无法在 Angular 中使用自动完成字段执行更改事件
- dart - 有没有办法在飞镖中使用 SHA1withRSA 对字符串进行签名?