我需要从谷歌商业帐户获取评论并显示到我的网站。
I have used below curl method "https://maps.googleapis.com/maps/api/place/details/json?key=$api_key&placeid=$place_id" to get google business reviews.
I have correctly provided api key,place id also enabled Google Maps Geocoding and Geolocating . I have got below error. How can I fix?`
Error :
[error_message] => This API project is not authorized to use this API. Please ensure this API is activated in the Google Developers Console: https://console.developers.google.com/apis/api/places_backend?project=_
[html_attributions] => Array
(
)
[status] => REQUEST_DENIED
答案 0 :(得分:0)
启用API“ Places API”后,我解决了此问题。如下图所示,单击选项“启用API和服务”。搜索“ Places API”并启用此服务。它应该可以解决您的问题。
对于我来说,我已经启用了“ Android版Places SDK”,并且尝试使用下面的网址调用Places API,但由于我需要启用“ Places API”,因此无法正常工作。
答案 1 :(得分:-1)
对于低音量/测试用量,您不需要谷歌API密钥。当您获得谷歌API密钥时,您可以摆脱测试的关键。请参阅不使用Google地图密钥运行的代码:https://plnkr.co/edit/5n66pLOC2rjJbl06tQ7C?p=preview
<script src="https://maps.googleapis.com/maps/api/js?libraries=places&callback=initMap"></script>