Domanda

I have blog on the blogger (blogspot) platform. When looking at the homepage, the number next to the share buttons for each individual post is only showing how many times the homepage has been shared through each social button.

Is there are way to display the accurate number of how many each individual post has been shared and not just the homepage?

For example, http://mashable.com/ displays accurate social media numbers for individual posts on the homepage. Yet, http://dmw-test-blog.blogspot.com/ is displaying only the number of times the homepage has been shared, even though the buttons are displayed under each post title.

I been searching for hours for a solution. Some suggest to not place the script under the < /head > tag, others suggested using the individual scripts from each social share site instead of the 3rd party ShareThis script, but neither suggestion worked.

Is there a solution or is the Blogger platform the problem?

È stato utile?

Soluzione

I found a solution.

By using the 3rd party share buttons from ShareThis, they have a tweak where you can add: "expr:st_title='data:post.title' expr:st_url='data:post.url'" to each button, forcing the share buttons to display the number of the post title url instead of the browser url.

For example, using the share buttons above, the new code would look like this:

<span class='st_twitter_hcount' expr:st_title='data:post.title' expr:st_url='data:post.url'/>

<span class='st_facebook_hcount' expr:st_title='data:post.title' expr:st_url='data:post.url'/>

<span class='st_googleplus_hcount' expr:st_title='data:post.title' expr:st_url='data:post.url'/>

<span class='st_linkedin_hcount' expr:st_title='data:post.title' expr:st_url='data:post.url'/>
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top