View Single Post
  #28  
Old June 21st, 2012, 08:15 PM
nzcid nzcid is offline
 
Join Date: Dec 2011
Posts: 404
Default

Quote:
Originally Posted by Eric View Post
Alternatively, you can put this code in your <head>:
HTML Code:
<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
And this code in your Text module:
HTML Code:
<div class="fb-like" data-href="<?php echo datafeedr_tools()->current_url(true); ?>" data-send="true" data-width="450" data-show-faces="true" data-font="arial"></div>
This appears to remove the padding and add additional functionality.

You can use the generator here: http://developers.facebook.com/docs/.../plugins/like/ under "Step 1 - Get Like Button Code". Just make sure to set the data-href to "<?php echo datafeedr_tools()->current_url(true); ?>"

You are missing a double quote in your <head> section:



One of my tests worked. I'm guessing you have tested this in a few different categories either before you added the <meta> tag to your <head> or before a category image was added. Unfortunately, Facebook caches things like crazy. So, I believe that it's storing some old image information from your previous tests. I did get it to work with one of your categories and that's what makes me think that it is working correctly but you tested it when it wasn't set up properly and those results have been cached.

Eric
Hey Eric

Okay I will leave things for a while and then test the like button again with Mr FB and see what image it uses.

As far as the other issue - the gap - I am simply not a fan of adding extra code into a theme as when it updates it breaks again. And if you are running multi sites you have to remember to add the code again to all these sites.

I understand Team that not every situation or circumstances can be programmed into a piece of software as it is dependant on outside influences such as Mr FB.

Still I think if you are going to build FB or any other Social Network into the plug-in then it should not require the users to add extra coding into their themes.

Seeing your response I am going to leave it as it is for the reasons given.