Google+ Embedded Posts
You can embed public Google+ posts in your site or articles with just a few lines of HTML code. Your signed-in Google+ readers can +1 or comment on your post directly from your site or follow the author.
Use of embedded posts is subject to the Embedded Content Policy.
Adding the embedded posts
Adding the embedded posts to your page is quick and easy. The easiest method is to locate the post that you want to embed on plus.google.com and click the menu icon and choose Embed post. A dialog displays with code that you can copy and paste into the desired location within your article or site. For example:
The link to the Google+ post must be in its canonical format:
The following URL formats are not supported:
Mobile web Google+ URLS:
In addition to posts that contain text and links, the following additional types of posts are supported as embedded posts:
- Posts with images - The post will render with the image. Clicking the image directs the visitor to the image view on Google+.
- Posts with videos - The post will render with the video. Clicking the video will play the video within the embedded post.
- Posts with links to a community - Your visitors can click through to view the community as they would in the stream.
The following post types are not supported:
- Posts from within a community, including publicly reshared posts from a community.
- Posts that are restricted to a Google Apps domain
- Private posts
- Events posts
- Hangout on Air posts
You can use the
onload callback when using the
asynchronous loading to start the execution of your code after all of the
dependencies have loaded.
You can render embedded posts dynamically by using the
gapi.post.render() method. This method
is useful when you dynamically load content or when you need to explicitly
control the execution of app. For example:
These parameters control the settings for each embedded post. You an set
these parameters as
attribute=value pairs on the HTML element or as
key:value pairs in a call to
Required for specifying your embedded post with HTML. This parameter is
not necessary when dynamically rendering an element with the
||URL to the post||
Sets the URL to the specific post that you want to embed in your page.
The URL must point to a publically shared post. If you set this
attribute by using
Script tag parameters
These parameters are defined within the
<script /> element.
The parameters control the
button loading mechanism that are used across the entire web page.
Sets the loading mechanism to use.
gapi.post namespace. You must call one of these
functions if you disable automatic rendering by setting
Renders the specified container as a embedded post.
Renders all embedded post tags and classes in the specified
container. This function should be used only if
|A post with an image:||A post with an video:|
Note that the author disabled comments on this post.
|A post with a link to a community:||An interactive post:|
|A post to a song on Google Play:||A post to a Google Play movie:|
- I use Wordpress.com, can I use embedded posts?
- Can I test this feature locally?
You will not be able to open an HTML file from your file sytem (file://) and preview the embedded posts. The embedded posts only load correctly when viewed from an http:// or https:// location. You can test from a local webserver. If you have python installed, you can quickly run the following command to serve the current directory's contents from
python -m SimpleHTTPServer
- Can I customize the appearance of the embedded post? Such as width or number of comments to display.
Currently, you cannot customize the appearance of the embedded post.
- Can I disable commenting on the embedded post?
Yes, if you disable commenting on the post from within https://plus.google.com by clicking the post's in the upper right corner of the post and choosing Disable comments.
You cannot disable comments for only the embedded post on your page.
- My embedded post is not displaying
- Are you using link to a supported type of post?
Is your post URL in the correct format?Correct: