Few days back you read about Add “Share on facebook” button to your blog/website with which you can install a Facebook ‘Share’ button in your blog or website. That was a good way of using ‘Share’ button with an option of four different buttons/links.
But today I am writing about how to install a Facebook ‘Share Count Button’ in your blogger or wordpress blog which is just similar to ‘Share’ button with an inbuilt counter too which counts the number of time that particular post is shared on Facebook.
This button is just similar to Tweetmeme button for Twitter, but when any particular post isn’t shared at all on Facebook, it shows a Facebook logo rather than a zero.
Blogger Installation:
- Go to Dashboard>>Layout>>Edit HTML, check ‘Expand Widget Templates’
- Now find the code
<data:post.body/>
(use the default one if you are using page navigation hack)
- Copy the code given below:
<div style=’float:right; margin-left:10px;’>
<script>var fbShare = {
size: ‘large’,
google_analytics: ‘true’
}</script>
<script src=”http://widgets.fbshare.me/files/fbshare.js”></script>
</div>
- Now paste the above code after <data:post.body/> if you want to show the button after the body of the post, else use it before <data:post.body/>
- Save the template and see the changes in your blog.
Customization:
- You can use the size ‘small’ in place of ‘large’ in the above code.
- You may edit float or margin in the above code.
WordPress installation:
To use this button on your wordpress blog just download the WordPress plugin for Facebook ‘Share Count Button’ here(by fbshare.me).
SOURCE: fbshare
20 Comments
Nice WordPress plugin.
good it worked for me but i hav one problem that the url which comes to share in each post is of my blog address only nd not the post address(url) wat to do if i want the url of post to come???
That’s sharing your homepage whenever you click a share button on your homepage, else it will share the specific post link.Try Using:
url: ‘http://offers4freee.blogspot.com/’,
before
size: ‘large’,
@Youngistaan
Thank you 🙂
@sauravjit thnx it worked…
np dude 🙂
hi, i followed your directions on blogger but i get this error: Your template could not be parsed as it is not well-formed. Please make sure all XML elements are closed properly.
XML error message: Open quote is expected for attribute “{1}” associated with an element type “style”….
this is what my code looks like:
var fbShare = {
size: ‘large’,
google_analytics: ‘true’
}
I want both the tweetmeme & fb at the top of post like u have it 🙂
For tweetmeme button read this tutorial http://www.devilsworkshop.org/add-tweetmeme-retweet-button-in-your-blogger-blog/
For this facebook button
1. Make sure that you enter code before </p
2. If you are using page navigation hack, there must be two
<data:post.body
use default one in that case.
3. If still not working use this link and download the new code file.
thats cool! I knew how to put a facebook add as a friend button but this is new for me. Thnx for the know-how
Nice to know that you liked it 🙂
Warning: This Message Contains Blocked Content
Some content in this message has been reported as abusive by Facebook users.
I Get the Above error When i share my post so now what should i do ???
Your URL shortener is blocked by Facebook, either try after 3-4 in case you are using a popular URL shortener service or change it.
i am not using any url shortner … its my blog url only …so if u can suggest hw to add the url shortner for sharing purpose also so that i could share links???
the facebook share count button uses a url shortener. If it’s sharing your original blog link and it’s showing blocked by facebook warning then somebody reported your blog’s link. Use a URL shortener in that case.
Any suggestions if someone reports your blog link as abusive?
Try using URL shorteners
but hw to use url shortner???
Go to any url shortener website like tinyurl.com and enter your original url….
var fbShare = {
size: ‘large’,
google_analytics: ‘true’
}
The above is the code where to make the changes so that when some one shares it the url shortner appears my question is that…
Use official share button.