[SOLVED] Facebook Share button not sharing posts separately
Hello,
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" type="text/javascript"> </script> 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, VBR, Karen |
Have you tried any plugins for this functionality. They may integrate better with WordPress the the FB code.
|
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? Thanks |
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> |
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 06:56 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.