Facebook Share Button With Count For WordPress

I don’t think the Official Facebook button is well enough. There is official Plugin also, but for advance developer they need control, we need flexibility to control the size and colour. While redesigning TheTechJournal.com I found FBShare.me is best to use with a bit easy tweaking for WordPress. Check The Code Below

In any place where you want to show the Share button, like index.php or single.php use this

<script>var fbShare = {
url: ‘<?php the_permalink() ?>’,
size: ‘large’,
badge_text: ‘C0C0C0’,
badge_color: ‘336699’,
google_analytics: ‘true’
}</script>
<script src=”http://widgets.fbshare.me/files/fbshare.js”>

For more control here is advance option

  • size – The size of the button: ‘large’ OR ‘small’ (if not specified, defaults to ‘large’)
  • url – The URL of the page you want shared on Facebook (if not specified, defaults to that of the page on which the button is displayed)
  • title – The name of the page you want shared on Facebook (if not specified, defaults to that of the page on which the button is displayed)
  • google_analytics – If no awesm_api_key specified, sets whether fbshare.me links have Google Analytics parameters added: true OR false (if not specified, defaults to false)
  • awesm_api_key – For existing awe.sm customers only (if not specified, will use fbshare.me links)
  • badge_text – Change the color of the text in the badge for the large button (use standard CSS RGB hex codes, *do not* include a leading #)
  • badge_color – Change the color of the badge background for the large button (use standard CSS RGB hex codes, *do not* include a leading #)

How it Works

awe.sm is a campaign tracking platform for social media that generates a unique link every time someone shares content through our system. Since each link is encoded with metadata about the share action it represents, including the channel for which it’s destined (e.g. Twitter or Facebook or LinkedIn, etc), it’s very easy to find out how many times a given URL has been shared to a given channel (and how many clicks those shares have generated).

This particular button is built on top of our Aggregate Data API, which can be used by any developer to retrieve anonymized aggregate data about the shares tracked through our system. We built it to showcase the power of our platform and the ease of developing on our APIs (this was a weekend project).

To learn more about awe.sm, check out our original announcement. And apply to the awe.sm developers group to get full access to our API documentation.

All Thanks goes to FBShare.me, i just make it useful for WP. And i am sure from now on everybody looking for this code will find this post in top of Google Search, as Google Loves me a lot.


Comments

15 responses to “Facebook Share Button With Count For WordPress”

  1. Here’s the Facebook Like button plugin (for the new Like button released April 21st 2010) available from WordPress:
    http://wordpress.org/extend/plugins/like
    No coding necessary, you can customize the look and placement of the button in the settings interface.

  2. I really like your writing style, its not generic and extremly long and tedious like a lot of blog posts I read, you get to the point and I really enjoy reading your articles! Oh, and merry Christmas!

  3. I keep listening to the news speak about getting free online grant applications so I have been looking around for the best site to get one.:)

  4. Thanks for sharing this info. I may sign up for a few just to pass the time when I

  5. I was wondering if you have the url for the article?

  6. You made a number of pleasant points present. I did a search on the subject and found a good number introduce somebody to an area will concur with your blog.

  7. I keep listening to the news speak about getting free online grant applications so I have been looking around for the best site to get one.

  8. I like your blog. I have found very interresting stuff on your site.

    You probably want to check my weblog too.

  9. Great blog. Thank you for this post.

  10. I stumbled onto your blog and read a few post. I like your style of writing.

  11. Hey, I just wanted to say what a brilliant website. I really enjoyed it and found it fascinating reading. Looking forward to your next post!

  12. Hey, this is a very nice blog! It seems you are doing well in the alexa rankings. If you can please help me jump in the rankings as well by checking out my site at http://www.publicdomainpayday.com thank you so much for your time and I will check back on here when I get a chance!

Leave a Reply

Your email address will not be published. Required fields are marked *