Google Plus Embedded Post

◇◆丶佛笑我妖孽 提交于 2019-12-13 04:13:02

问题


Im trying to increase Google Plus ses to my shared post its here : https://plus.google.com/115561497496668104701/posts/MiZJMK9KHFX but than i embedded that post to my website http://zippyviews.com/Gviews.html there so what i want to increase that Google + ses now its 147 but when i add my website to google plus exchange websites people are not clicking g + buttons and i want to only leave on that page only google + button not full post only google + button how to extract that button code?


回答1:


I was looking for some help with the embedded post in Google plus and the code that BetaCoder put works perfectly with the post as well.

<div class="g-post" data-href="https://plus.google.com/109813896768294978296/posts/hdbPtrsqMXQ"></div>

(function() {
    var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
    po.src = 'https://apis.google.com/js/platform.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
  })();

http://jsfiddle.net/WbUfW/14/




回答2:


The Best Place to Start your Search is from Google's Own developer Library.

https://developers.google.com/+/web/+1button/

Here is the Pseudo Code that you need for a single button

Working example - http://jsfiddle.net/WbUfW/1/

<div class="g-plus" data-action="share"  data-href="https://plus.google.com/115561497496668104701/posts/MiZJMK9KHFX"></div>

JS code

<script type="text/javascript">
  (function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/platform.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
 })();
</script>

Customize the button config @ https://developers.google.com/+/web/+1button/



来源:https://stackoverflow.com/questions/20783276/google-plus-embedded-post

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!