Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/298.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/api/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在php中使用Google MyBusiness API_Php_Api_Oauth 2.0_Google My Business Api - Fatal编程技术网

如何在php中使用Google MyBusiness API

如何在php中使用Google MyBusiness API,php,api,oauth-2.0,google-my-business-api,Php,Api,Oauth 2.0,Google My Business Api,我正在使用GoogleMyBSinessAPI获取所有业务评论。 但我无法熟悉PHP语法和在MYBusiness中使用的GET、POST方法 宣誓后这里是我用来获取评论的代码 $mybusinessService = new Google_Service_Mybusiness($client); $accessToken = file_get_contents($credentialsPath); $reviews = $mybusinessService->accounts_locat

我正在使用GoogleMyBSinessAPI获取所有业务评论。 但我无法熟悉PHP语法和在MYBusiness中使用的GET、POST方法

宣誓后这里是我用来获取评论的代码

$mybusinessService = new Google_Service_Mybusiness($client);
$accessToken = file_get_contents($credentialsPath);

$reviews = $mybusinessService->accounts_locations_reviews;
echo '<pre>';print_r($reviews->get('ArtechDev'));exit;
$mybusinessService=new Google\u Service\u Mybusiness($client);
$accessToken=文件获取内容($credentialsPath);
$reviews=$mybusinessService->accounts\u Location\u reviews;
回声';打印($reviews->get('ArtechDev'));出口
但我得到了错误404(致命错误:未捕获的异常“Google\u服务\u异常”和消息)

我确信我不知道如何通过param以及需要哪些东西。我是以帐户的身份登录的,地址也为'ArtechDev' 让我知道我在哪里可以打电话


谢谢

我希望你很久以前就找到了问题的答案,不管怎样,我会留下这个,希望能帮助别人

$mybusinessService = new Google_Service_MyBusiness(...);
$accounts = $mybusinessService->accounts;
$A数量来自:


什么是
$accounts
?如何生成google\u my\u business\u credentials\u file.json文件?@5x7Code您可以从这里创建。
$mybusinessService = new Google_Service_MyBusiness(...);
$accounts = $mybusinessService->accounts;