0

I've been struggling to implement a facebook like button with the send option for days now. I desperately need some help.

Recently I added a facebook like button to all the nodes in my site by using the iframe and editing the node.tpl file. And everything was good.

Unfortunately my client now also wants a send button added to every node. And you guessed it! The iframe is not supported when you want a send button.

So I tried adding the code to the page myself and it failed. I tried using the likebutton plugin. That failed too.

So now I'm using http://drupal.org/project/fb_social the 6.x-2.0-beta4 which works with ctools. And it still does not work! I've been looking for javascript errors but my browser says there are none.

The code does execute however it adds this to the nodes:

<div class="fb-like" data-href="http://www.myurl.com" data-colorscheme="dark" data-font="verdana" data-action="like" data-width="350" data-show_faces="false" data-layout="button_count" data-send="true"></div>

But there is no button to be found. The div has a width but does not have a height. When I give it one, it is simply empty.

When trying to find solutions to this problem I came across a post that implied that you needed to turn off the HTML corrector in the full HTML filter; this did not work.

So I would like to ask if any of you have ever encountered a problem such as this (and with facebook I'm sure you have) and if you'd be so kind to help me.

  • You need to reword your post to contain one concise, answerable question. Do you want help using the fb_social module, or do you want suggestions for general solutions to creating an FB "like" button? Only include information relevant to that question (we don't need to know about your iframe attempt if you are asking about how to use fb_social) and be sure to give as many details as possible about your situation (if you need help with fb_social, give the exact steps you have taken to attempt to implement the intended functionality). – sheena_d May 21 '12 at 13:02
  • Alright, thank you for the comment. I was simply trying to give some background information but I get your point. What I was trying to ask is how do you add a facebook like + send button to your nodes using the fb_social module. The background information I gave was simply to illustrate te previous steps I've taken which may or may not cause problems. And they did. I solved the issue now, and I will post the "answer" as soon as I am able (need to wait a few hours). – Mike May 21 '12 at 13:18
2

So the fb social module itself works fairly well.

The problem I had in this case was that there was some leftover javascript SDK code (from previous attempts to get it working) in the page which was conflicting with the new SDK code therefor no buttons showed up.

I ended up using the newer beta version of fb social in stead of the recommended version, it works a lot smoother.

  • I tried also fblikebutton module, but it had display issue. The one that seamlessly worked for me was fb_social-6.x-1.0-beta9 – alfish Jul 22 '12 at 1:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.