Deepak
Deepak

Reputation: 13

Google+ sharing not populating Image, title, description

I am trying to use Google+ share on my website. I am using one anchor tag.

<a target="_blank" id="btnGoogleShare" href="#" runat="server">
Google+</a>

In code behind I am setting Href as

btnGoogleShare.Href = "https://plus.google.com/share?url=[My site url]/page?_i=10"

I've added following tags in head tag

<script type="text/javascript" src="https://apis.google.com/js/plusone.js">
</script>   
<meta itemprop="name" content="Sample Title">
<meta itemprop="description" content="Sample Description">
<meta itemprop="image" content="[My site url]/SampleImage.jpg">
<meta property="og:type" content="website">
<meta property="og:url" content="https://plus.google.com/share?url=https://plus.google.com/share?url=http//:MySite.com/page?_i=10>
<meta property="og:title" content="Sample Title">
<meta property="og:description" content="Sample Description">
<meta property="og:image" content="[my site URL]/SampleImage.jpg">

I am running my website in localhost in visual studio. When I click on link I am getting only url in google plus share dialog. title, description, image is not populating. Any Idea? It may be because I am running in dev environment in visual studio using localhost?

Upvotes: 1

Views: 1242

Answers (1)

abraham
abraham

Reputation: 47833

I am running my website in localhost in visual studio.

Google+ populates the field by fetching the page and parsing the details via Google servers. If the URL is not live and publicly accessible on the internet, Google+ sharing will only show the URL.

Upvotes: 1

Related Questions