Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Forum How-To (http://forum.bytesforall.com/forumdisplay.php?f=9)
-   -   [SOLVED] Facebook Share button not sharing posts separately (http://forum.bytesforall.com/showthread.php?t=10884)

Karen Nov 1, 2010 09:26 AM

[SOLVED] Facebook Share button not sharing posts separately

I would like to add a Facebook Share button (with count) to all my posts. I took the following code from Facebook:

<a name="fb_share"></a>
<script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share"

and then put in the loop after byline. The button appears on every post on the homepage, but won't take the link of the single post only from the whole website.

What can be the problem?

Thanks for helping me out,

lmilesw Nov 1, 2010 11:59 AM

Have you tried any plugins for this functionality. They may integrate better with WordPress the the FB code.

Karen Nov 1, 2010 12:12 PM

Hi lmilesw,

Thank you for you reply. Yes, I've tried some plugins, but then the counter was overreacting, e.g. 111,111 shares, that's not normal. So I thought I better place some code in the loop. I know other people are using that as well.

Do you have an idea?

Big Geek Daddy Dec 5, 2010 05:52 PM

This is the code I have in Single Post Byline:

<a name="fb_share" type="button_count" href="http://www.facebook.com/sharer.php">Share</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>

Karen Dec 6, 2010 01:30 AM

Thanks, I figured out that you also need to put something extra so it shares the post separately. I now use the following code and it's working!

<a class="facebookShare" name="fb_share" type="button_count" href="http://www.facebook.com/sharer.php" share_url="<?php the_permalink() ?>">Share</a>
<script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>

All times are GMT -6. The time now is 08:03 AM.

Powered by vBulletin® Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.