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>

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.

Thanks it works now.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.