Category : google-my-business-api

I’m trying to update/patch a specific GMB Local Post using curl. For this example, I’m only trying to update the summary of the post. Here’s my code: $url = "https://mybusiness.googleapis.com/v4/".$postId."?updateMask=1"; $ch = curl_init($url); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, ‘PATCH’); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $pQuery = array( "summary" => $postMessage ); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($pQuery)); curl_setopt($ch, CURLOPT_HTTPHEADER, array( ‘Authorization: Bearer ‘.$access_token.”, ..

Read more

I am trying to make Google My Business localPost for topicType offer in PHP. I installed google/apiclient 2.7. Also, I have client library from GMB site as following. https://developers.google.com/my-business/samples/google-api-services-mybusiness-v4p7-php-rev-20200824-1.zip I made following source code. $offer = new Google_Service_MyBusiness_LocalPostOffer(); $offer->setCouponCode($couponCode); $offer->setTermsConditions($termsCondition); $offer->setRedeemOnlineUrl($redeemOnlineUrl); $schedule = new Google_Service_MyBusiness_TimeInterval(); $date = new Google_Service_MyBusiness_Date(); $date->setDay(6); $date->setMonth(10); $date->setYear(2020); $time = new ..

Read more

I have to try to fetch review using google my business API but I am getting method not found. If I use the post method then it returns null. Here is my curl code. $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $api_end_point_url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET"); curl_setopt($ch, CURLOPT_HTTPHEADER, array(‘Authorization: Bearer ‘. $authorization,’Content-Type: ..

Read more