问题
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