简体   繁体   中英

Google Places API Reviews Widget

I'm trying to embed Google's "write a review" widget into my website. Much like what Podium.com does.

They host a page and load an iframe with the src:

https://www.google.com/maps/api/js/ReviewsService.LoadWriteWidget?key=THEIR_API_KEY&pb=!2m1!1sChIJ6VFjYpqa9YgREIJTX-XLyoE!3shttps%3A%2F%2Ftheir-url.com!5sen&cb=37369878

This renders the widget like so: 写评论小工具

I dug into their html source and it appears they're using the Google Places Reviews Widget. I searched Google and Google Developers for "Google Places Reviews Widget" which returns results:

搜索结果列表

However, the links go to a 404 page:

I've replicated what Podium is doing on my own page using my API key. However, the widget doesn't display. I don't get any errors, the iframe loads some scripts and some hidden html elements, but doesn't render the full widget.

Is this an API or feature that I'm unable to access? Has anyone implemented something similar?

I also had the exact same experience and reached out to Google about it.

Here's their preliminary reply on Sept 4, 2018

Apologies for the delay on this.

May I ask if you followed the steps here: https://developers.google.com/places/reviews/#api-key

It says there that, "Before you begin coding, notify your Google contact person that you intend to create a project to use the Google Places API Reviews Widget. Indicate the email address of the Google account you intend to use to manage the project. Google will use this email address to allow you to activate the API for your project.

After your Google contact person has confirmed that your email address can activate the Google Places API Reviews Widget, you can follow the instructions here: https://developers.google.com/places/reviews/#api-key to activate the API and create your key.

May I ask if you have a contact person? If you don't have one, apologies but the Review's Widget is not generally available, because it needs some special authorization before it can be used. Please note that we are investigating to see if you can get access to that Widget.

If you do have a contact person, please let me know.

Moving forward, may I ask what kind of places would you like to use the Reviews Widget for?

Then this:

With regards to your intention in using the Review Widget, I would like you to know that unfortunately, the Review Widget is not available at the moment yet. We don have a date for expected general availability for this product but I can get back to you and inform you once the Review widget is already available publicly. Once again, apologies for this inconvenience.

And finally:

The Reviews Widget is only actually limited to trusted partners as of the moment. Moreover, the Review Widget team isn't looking for new testers at the moment:

With that said, the public documentation on the Reviews Widget has already been set into private. As mentioned, the Reviews Widget is not yet available for the general public.

Sorry to be the bearer of bad news...

check this out... I dunno if this helps. i've been trying to figure this out too. A company called BirdEye has this Review Portal that opens the post-review widget on the page. I inspected the code and found that there are 2 JS scripts calling on Google's Places API (image attached). The button code I'm assuming hitting these scripts is just below. Does this make sense to anyone? I'm not able to get into the actual JS file though.

<button class="btnReviewSite2" data-source-url="https://www.google.com/search?q=Innovative+Roofing&amp;ludocid=8385655751686277266&amp;gws_rd=cr&amp;fpstate=lie&amp;lrd=0x87938c4de368e6b3:0x745fd57a1ff8c892,2#trex=m_t:lcl_akp,rc_f:nav,rc_ludocids:8385655751686277266" data-place-id="ChIJs-Zo402Mk4cRksj4H3rVX3Q" data-google-embedded="1" data-source-url_9="" data-source-id="2">
<span class="aggr-source-wrapper">
<span class="rev-site-2 presenceIcon aggr-source-2 aggr-dummy-source-g">
</span>
</span>
<span title="Review us on Google">
</span>
</button>

Google Places API JS Script

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM