0

Hi,

I cannot make Google Plus button visible in my tests on local machine. Do I miss anything in code below?

Thanks

<html>
  <head>
    <title>+1 demo: Basic page</title>
    <link rel="canonical" href="http://www.example.com" />
	<!-- Place this render call where appropriate -->
	<script type="text/javascript">
	  window.___gcfg = {lang: 'en-GB'};

	  (function() {
		var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
		po.src = 'https://apis.google.com/js/plusone.js';
		var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
	  })();
	</script>	
  </head>
  <body>
	<!-- Place this tag where you want the +1 button to render -->
	<g:plusone size="medium"></g:plusone>
  </body>
</html>
2
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by veledrom
0

If this is executed locally, without a webserver, then the remote Javascript file will not be executed for security reasons.

If you are running WampServer or XAMPP (assuming Windows) locally, then it should work.

Edited by pritaeas: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.