Just installed 2.1. Reset Dynamic Settings to defaults, except ticked boxes to show on all content types. Set permission "access fblikebutton" on for anonymous users. The button shows when I'm logged in as admin, but is not there when I'm logged out.

Am I doing something wrong, or is this a bug?

Thanks for your work on this module, by the way!

Comments

Anonymous’s picture

Version: 7.x-2.x-dev » 6.x-2.1

I'm sorry, I reported the version wrong. It's 6.x-2.1, not 7.x.

dmsmidt’s picture

I haven't noticed this issue.
In which way do you show the dynamic button?
If you use a block, you should check you block settings. The block should be visible for anonymous users as well.

Anonymous’s picture

Status: Active » Closed (cannot reproduce)

Sorry, I was faking myself out. It works fine. There's no bug.

Thank you very much!

erahbee’s picture

I still have this same problem.
It shows/displays for admin but not for any other users.
I have cleared caches. Permissions are set OK.

Altsal or others, how did you solve this?

I use the Dynamic button in the content area.
Actually the page for non-admin users shows extra empty space at the position wher you would expect the button. Thus empty space is displayed, but no button to be seen.

Anonymous’s picture

In my case, it turned out I was looking in the wrong place. Sounds like you may have a different issue.

VTM’s picture

dynamic nor static does not display for me too.
either as a block or in content /links.

Anonymous’s picture

Status: Closed (cannot reproduce) » Active

OK, I'm marking this as "active" again.

I'm not sure what makes it sometimes work and sometimes not, but currently it is not working at, for example:

http://buddhism-for-vampires.com/secular-buddhist-halloween-podcast

There is space for the button in the links row, but it does not display.

The relevant part of the page source has:

<li class="fblikebutton_field first"><span><iframe src="https://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fbuddhism-for-vampires.com%2Fsecular-buddhist-halloween-podcast&amp;layout=button_count&amp;show_faces=hide&amp;width=80px&amp;font=arial&amp;height=20px&amp;action=like&amp;colorscheme=light&amp;locale=en_EN" scrolling="no" frameborder="0" style="border: none; overflow: hidden; width: 80px; height: 20px;vertical-align:bottom;padding-bottom:3px;" allowTransparency="true"></iframe></span></li>

I'm not sure why that fails to display the button, but it does fail on FF, Chrome, and Opera. (So it's not a browser issue.)

john.oltman’s picture

I am having the same problem on a customer site and 7.x version. The button was there before, and has disappeared recently.

donpwinston’s picture

Our Like button all of a sudden stopped working. The iframe code is in the page but the button is not displayed. I don't know if Facebook changed something or if some other change to our website broke it. (We added a couple of new Ubercart modules and removed some pages. Nothing to do with the fblikebutton module).

dark_kz’s picture

Title: Like button does not show for anonymous users » Like button does not show

Have the same problem. Iframe is empty, for all users, anonymous and logged

donpwinston’s picture

I used PHP to include a small template for the Facebook iframe code instead of the fblikebutton module and it works for some reason. I've lost all my "Like" counts for my page though.

I'm hurting my eyes trying to figure out the difference between my iframe code and the fblikebutton module produced iframe code. The fblikebutton has more parameters. One works and the other doesn't!

cyberworm’s picture

FB Like button works OK in "standart" layout mode only. Box Count or Button Count doesn't show.

donpwinston’s picture

<div class="tw-fblikebutton"><?php include("fblikebutton.tpl.php"); ?></div>

where fblikebutton.tpl.php is
<iframe src="https://www.facebook.com/plugins/like.php?href=<?php print urlencode(url("node/$node->nid", array('absolute' => TRUE))); ?>&amp;layout=button_count&amp;show_faces=true&amp;width=100&amp;action=like&amp;colorscheme=light&amp;height=30" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:30px;" allowTransparency="true"></iframe>

This works for me but the fblikebutton module produced code does not for some reason. The result is in the page but it's not displayed.
My version retained my old "Like" counts also. Unlike what I said before.

To get this to work as links at the bottom of the page requires a little more work. If you don't want to have to create a template for every page you want to use it then you got to put it in a module or maybe a theme function override.

donpwinston’s picture

Who thought it was a good idea to change the field name from fblikebutton_button to fblikebutton_field?

This might be ok for version 7 but not for for version 6. I had to edit all of my templates because of this! (It's not my fault I'm using so many templates)

john.oltman’s picture

The issue is the invalid "px" in the height and width tags for the IFRAME. FB might have tolerated those before but they must be validating the HTML more closely now and will hide the button if you include the "px" (it's ok to have the "px" in the style tag). To fix the issue in the D7 version of the module, change this in the field rendering code within fblikebutton.module at line 224:

$params = "href={$webpage_to_like}&layout={$layout}&show_faces={$show_faces}&width={$width}px&font={$font}&height={$height}px&action={$action}&colorscheme={$colorscheme}&locale={$language}";

to this:

$params = "href={$webpage_to_like}&layout={$layout}&show_faces={$show_faces}&width={$width}&font={$font}&height={$height}&action={$action}&colorscheme={$colorscheme}&locale={$language}";

I'm sure the D6 fix is similar.

Anonymous’s picture

Not working for me, unfortunately.

In 6.x-2.1, the corresponding code line is 230; I deleted two instances of "px".

The button is still not showing. I've cleared the cache and verified that the px does not appear in the page source.

(Example page: http://buddhism-for-vampires.com/metablog/follow-me-on-twitter )

Anonymous’s picture

OK, I had to delete the locale parameter as well. With that, it works. (Same test URL as in #16.)

Based on http://developers.facebook.com/docs/reference/plugins/like/ , it appears that the locale parameter is no longer supported.

There are other differences between the fblikebutton HTML and that given by the Facebook developers' reference. For now, it appears that they are tolerated, but it would probably be good to bring this code into perfect conformity, to defend against future changes in what they will tolerate.

Thank you, john.oltman, for your work on this!

jgtrescazes’s picture

Priority: Critical » Major
Status: Active » Needs review

To trace your fixes on drupal 7's module version, I just created an issue on D7 with a patch that integrates your changes.
http://drupal.org/node/1570374
Thanks for your investigations.

dmsmidt’s picture

I can't reproduce the problem in the first place. My instance still works.
Any more clues?

I think it would be good to add the HTML5 and XFBML version.
I'm reluctant in dev-ing more since http://drupal.org/project/fb_social already does a lot this module does and more.

Anonymous’s picture

My settings are:

Dynamic
Links area
Don't show on teasers
80x20 px
Extra CSS: vertical-align:bottom;
Button Count
Do not show faces
Verb: Like
Font: Arial
Color: light
Weight: 50
Language: en_US [but I had to mod the code to disable this to get it to show]

svnindia’s picture

Hi

Read the below thread

http://drupal.org/node/1548260

It may help some one.

thanks,
Svnindia

marschiee’s picture

Same for me! Had the same problem a couple of months agon and then updated drupal coe and it worked i belieive...

Anonymous’s picture

Darn it! Stopped working for me again.

This time, I modified the Drupal module to produce exactly the output mandated at http://developers.facebook.com/docs/reference/plugins/like/, and it still is not appearing.

I believe Facebook is making real-time changes in their code, and breaking things.

marschiee’s picture

The solution to all your problems: Modify the *.module file by removing the two p's after the width and height attributes on code line 221 or something. Then it will work.

Anonymous’s picture

And it has just started working again, without my having made any changes.

My guess is that Facebook is pushing code changes out to their CDN, and the reason for inconsistent behavior is that different CDN nodes are getting the changes at different times.

ChrisLaFrancis’s picture

As a1tsal stated, the like button only shows up again when the "px" is removed from the "width" and "height" parameters, and the "locale" parameter is completely removed. Attached is a patch against 6.x-2.x.

TarKHaoS’s picture

Version: 6.x-2.1 » 7.x-2.0

#15 solution worked for 7.x-2.0

Anonymous’s picture

Maybe one of you could change the status to "reviewed & tested by the community"?

I can't do that because it's partly my fix :-)

zyxware’s picture

Status: Needs review » Reviewed & tested by the community

Tested patch in comment #26 on 6.x-2.1 and got the facebook like buttons working again.

If locale is not working shouldn't the admin settings form be modified as well?

ChrisLaFrancis’s picture

Version: 7.x-2.0 » 6.x-2.x-dev

This bug was originally reported for 6.x-2.1, and the patch I attached above is for 6.x-2.x, so changing the version from 7.x-2.0 to 6.x-2.x. If this is also happening for 7.x-2.x, someone should create a patch against that.

guysung’s picture

It's been working well since I patched the module following #26 comment but
It suddenly disappears again. Any Idea?

cyberworm’s picture

Patched, worked, now don't working again (working in standart layout style only).

Anonymous’s picture

Status: Reviewed & tested by the community » Needs review

Verified that it had stopped working again.

Facebook has changed the API again.

They now want just ...&layout_button_count&... instead of ...&layout=layout_button_count&...

Deleting layout= in fblikebutton.module fixes the problem. (Example: http://meaningness.com/)

If this works for you, please set RTBC.

I wonder if constantly changing the API and breaking everyone's pages is Facebook's subtle way of telling us they want everyone to use their HTML5 code instead of <iframe>?

cyberworm’s picture

#34
It ignores layout style. Button and box changed to standart.

almaris’s picture

Everything I changed to get it up to snuff:

in fblikebutton.admin.inc:
change both occurrences of fblikebutton_show_faces blocks to use true/false instead of show/hide (it seems to fail on any but standard if you do not do this)

in fblikebutton.module:
add &send=false
remove "px" from width and height
remove "locale=" block

Here's my final line:
//See http://developers.facebook.com/docs/reference/plugins/like/
$params = "href={$webpage_to_like}&send=false&layout={$layout}&width={$width}&show_faces={$show_faces}&action={$action}&font={$font}&height={$height}&colorscheme={$colorscheme}";

ChrisLaFrancis’s picture

This patch implements almaris' fixes from comment #36. After it's applied, you'll need to re-save the settings for the module on its administration pages because of changing 'fblikebutton_show_faces' and 'fblikebutton_bl_show_faces' to use true and false instead of show and hide. The variables 'fblikebutton_show_faces' and 'fblikebutton_bl_show_faces' probably should probably have their values altered accordingly in a hook_update_N()...

ChrisLaFrancis’s picture

Same as my patch above in #37, except with an implementation of hook_update_N() that updates the 'show_faces'-related variables to 'true' and 'false' from 'show' and 'hide', so you won't have to worry about resetting those values at the module's administration pages.

mmtahir’s picture

While I was trying many things, when I changed the https to just http in the link url, it worked. I just wonder what's the reason

mmtahir’s picture

#38 worked for me

ChrisLaFrancis’s picture

This issue, #1664410: button doesn't show because show_faces stores the wrong value, and #1570374: Like button doesn't display anymore are all more or less the same thing: the like button stops showing up because Facebook has changed its expectations of the parameters that are sent.

lliss’s picture

Status: Needs review » Fixed

Fixed in most recent dev version.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

kettultim’s picture

Component: Code » Documentation
Status: Closed (fixed) » Needs work

Confirmed this is not fixed with 6.x. Updated the patch then most recent dev version.. nothing happening. Can't figure it out.

vako’s picture

This is fixed for D7, hopefully we can also have a fix for D6 users.

ChrisLaFrancis’s picture

Latest dev has been working for me with D6 since it was released.

vako’s picture

Status: Needs work » Closed (fixed)

Yes, I downloaded the latest Dev and the faces are not showing up. It's fixed. Thank you!

pokepasa’s picture

Title: Like button does not show » Problem discovered FOR ME

Hi, after reading a lot, I discovered that MY PROBLEM was the incorrect LOCALE language.

I had en_EN for english... but for some reason, this language disappeared on Facebook, so I changed it to en_US (from USA, not standard ENglish) and all started to work again.

Remember to make the changes in both Dynamic and Static menus.

mrpeanut’s picture

Title: Problem discovered FOR ME » Locale language affects visibility