Hi

I enabled this module, add contentype for like button (blog, and some others), but nothing is shown for me on the nodes.
Doesn't matter if the like button is in the node or in the links.
Here would be like button, but it isn't: http://www.somvprahe.sk/blog/truli/pravda

Are there any other necessary steps? There are no permissions for this module, so I am really lost why it doesn't work at all for me.

thanks
Igor

CommentFileSizeAuthor
#53 fb_social-n791228-52-d7.patch2.83 KBDamienMcKenna
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

igorik’s picture

I found that problem is with IE 8. With Firefox it works nice.

chawl’s picture

You (in fact module) should include this code in page.tpl.php to work with IE. Do not remove other xml related things in html tag if exist, just add this two xmlns defs then.

<html xmlns:og="http://opengraphprotocol.org/schema/"
      xmlns:fb="http://www.facebook.com/2008/fbml">

Hope this solves.

HS’s picture

+1

ferdi’s picture

@chawl thanks for the tip. The module actually cant easily add that information in the page.tpl.php

chawl’s picture

Yes ferdi, sorry for the typo, I meant the documentation in fact. Tx for a great module btw.

igorik’s picture

thanks chawl, now it works for me. But in IE 8 it is shown in the node before the content, and in the Firefox, it is show after the content. I suppose that in the Firefox it is right.
Any ideas why it is wrong in IE?
You can test it on the same url: http://www.somvprahe.sk/blog/truli/pravda

thanks
Igor

chawl’s picture

By the way, I think IEs are right for the first time in the history #792192: Like button shows up in a different place in IEs than others

Even a broken clock shows the right time twice a day. I think this is a JS issue that FB should fix.

ferdi’s picture

Status: Active » Fixed

I hope this is fixed in the alpha4 release

vtsaran’s picture

Is the documentation lacking or I am not doing something correctly? My "like" buttons do not show either in IE or Firefox. Here are the steps I took:

1. Installed and enabled the module(s).
2. Enter the application ID for my site, gotten from Facebook Developers site, Adjusted all the settings under "administer".
Still do not see any buttons on my site. I do see the fb:like tags in appropriate places though.
Where else should I look to troubleshoot?

The site is www.victortsaran.net.

Thanks,
Victor

chazz’s picture

For me like button doesn't work at all :( Everything is enabled

chazz’s picture

Tried to put this to contemplate:

print $node->content['fb_social_like_widget']['#value']

But still doesn't work, nothing to display...

chazz’s picture

Status: Fixed » Active
ferdi’s picture

I'm guessing (from #804994: Can I get user email and password when "map account" is enable?) that you have enabled some other drupal modules that are using the old version of fb api. See http://drupal.org/node/784872#comment-2909838

egomac’s picture

If you are using drush to enable the module, you might want to look at the admin/build/modules page and you need to enable the other modules associated with the fb_social module. There are 3 other modules that needs to be enabled.

HS’s picture

Title: Like button doesn't show to me » Facebook 'Like' button doesn't show in Internet Explorer

Does not work on Internet Explorer. Sorry I created a duplicate issue because the title on this issue is vague. Changed title as well :)

ferdi’s picture

Status: Active » Closed (fixed)

Please see the FAQ section in the front page of this project

liquidcms’s picture

Version: 6.x-1.0-alpha3 » 6.x-1.0-beta4
Status: Closed (fixed) » Active

sorry to re-open but there is still an issue with this solution.

YES - adding this to the top of page.tpl

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php print $language->language ?>" dir="<?php print $language->dir ?>" xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://www.facebook.com/2008/fbml">

does allow the FB Like button to show in IE8 but it causes IE8 to popup a XSS warning.

Compel’s picture

I don't get page errors.... or the LIKE button in IE8.

Everything is working in FF.

I tried the snipped versions in #2 and in #17 with no luck. I can understand how this might not be possible to address in the module itself, but if there is an undocumented fix it would be helpful to document it.

For purposes of testing, I am using 6.19 fb_social.info,v 1.3.2.1 2010/07/11

liquidcms’s picture

my issue with FB Like and XSS was caused by incompatibility with with this module and the FB Connect module. This issue has since been fixed (not sure of commit status) with an update to the FB Connect module.

not sure if you are seeing the same issue.

Compel’s picture

Not using FB Connect.

Compel’s picture

Re #20 This may sound obvious, but apparently wasn't to me: check user permissions. I was reminded of this as I run Admin in FireFox so I can see what's going on and Authenticated_User in EE. Authenticated_User didn't have permission set to access the Like button.

aken.niels@gmail.com’s picture

Fix #17 worked for me. Be sure you are adding it to your opening tag. I've just had some problems with getting this fix to work, but then I noticed I din't had have enough coffee, I'd added it to my DOCTYPE. Dow!

Marcus 78’s picture

When I use the

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php print $language->language ?>" dir="<?php print $language->dir ?>" xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://www.facebook.com/2008/fbml">
 

I get som problems with my cse search function in IE8.
When I push the search button i get the search resultpage for about 1 second then I´m redirected towards a wsod page. Checked the errors and its the following (not an exact copy but my translation so there might be some differenses)

Message: 'undefined' is null or not an object
Row: 16
Character: 609
Code: 0
URI: http://connect.facebook.net/sv_SE/all.js

Message: Undefined argument.
Row: 66
Character: 5
Code: 0
URI: http://mysite.com/sites/all/themes/my_theme/scripts.js?U
 

Anyone who knows what this is all about

ferdi’s picture

Status: Active » Closed (fixed)

Normally the like button shows on IE if the page template is modified similar to #2. Closing this ticket.

doublejosh’s picture

Not showing for me either, but might be related to an undefined jQuery object caused by double loading all my js files via CTools AJAX. Arg!

krembo’s picture

Status: Closed (fixed) » Active

Actually added the code to the html tags, but nothing works.
This is in html tag.

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml" xmlns:og="http://opengraphprotocol.org/schema/" xml:lang="<?php print $language->language; ?>" version="XHTML+RDFa 1.0" dir="<?php print $language->dir; ?>" 
  <?php print $rdf_namespaces; ?> >

No permission problem, cause checking this under admin FF works, IE not.

anthonyR’s picture

Comment #2 fixed it for me.
Using Fb Social 6.x-1.0-beta5

Infinitee’s picture

Try this (get instead of print!):

<html xmlns="http://www.w3.org/1999/xhtml" lang="<?php echo get_page_language($language); ?>" xml:lang="<?php echo get_page_language($language); ?>" xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://www.facebook.com/2008/fbml">
markconroy’s picture

I'm having a problem using this with an Artisteer generated theme. I'm not sure exactly what I should add and where. This:

xmlns:og="http://opengraphprotocol.org/schema/"
xmlns:fb="http://www.facebook.com/2008/fbml"

looks a lot different to this:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php print $language->language ?>" dir="<?php print $language->dir ?>" xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://www.facebook.com/2008/fbml">

Here's the first 20 or so line of my code without adding anything.

<?php

	$vars = get_defined_vars();
	$view = get_artx_drupal_view();
	$view->print_head($vars);

	if (isset($page))
		foreach (array_keys($page) as $name)
				$$name = & $page[$name];
	$art_sidebar_left = isset($sidebar_left) && !empty($sidebar_left) ? $sidebar_left : NULL;
	$art_sidebar_right = isset($sidebar_right) && !empty($sidebar_right) ? $sidebar_right : NULL;
	if (!isset($vnavigation_left)) $vnavigation_left = NULL;
	if (!isset($vnavigation_right)) $vnavigation_right = NULL;
	$tabs = (isset($tabs) && !(empty($tabs))) ? '<ul class="arttabs_primary">'.render($tabs).'</ul>' : NULL;
	$tabs2 = (isset($tabs2) && !(empty($tabs2))) ?'<ul class="arttabs_secondary">'.render($tabs2).'</ul>' : NULL;
?>

<div id="art-main">
<div class="art-sheet">
    <div class="art-sheet-body">
<div class="art-header">
    <div class="art-header-jpeg"></div>

</div>
<?php if (!empty($navigation) || !empty($extra1) || !empty($extra2)): ?>
<div class="art-nav">
    <div class="l"></div>
    <div class="r"></div>
    <?php if (!empty($navigation)) : ?>
    <?php echo render($navigation); ?>
    <?php endif; ?>
</div>

So, how should my page.tpl.php code look AFTER I add the Facebook Social code?

Thanks in advance for your help.

markconroy’s picture

Fixed it. It should look like this:

<?php
// $Id: page.tpl.php,v 1.18.2.1 2009/04/30 00:13:31 goba Exp $
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php print $language->language ?>" dir="<?php print $language->dir ?>" 
xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://www.facebook.com/2008/fbml">


<?php


	$vars = get_defined_vars();
	$view = get_artx_drupal_view();
	$view->print_head($vars);

	if (isset($page))
		foreach (array_keys($page) as $name)
				$$name = & $page[$name];
	$art_sidebar_left = isset($sidebar_left) && !empty($sidebar_left) ? $sidebar_left : NULL;
	$art_sidebar_right = isset($sidebar_right) && !empty($sidebar_right) ? $sidebar_right : NULL;
	if (!isset($vnavigation_left)) $vnavigation_left = NULL;
	if (!isset($vnavigation_right)) $vnavigation_right = NULL;
	$tabs = (isset($tabs) && !(empty($tabs))) ? '<ul class="arttabs_primary">'.render($tabs).'</ul>' : NULL;
	$tabs2 = (isset($tabs2) && !(empty($tabs2))) ?'<ul class="arttabs_secondary">'.render($tabs2).'</ul>' : NULL;
?>

<div id="art-main">
<div class="art-sheet">
    <div class="art-sheet-cc"></div>
    <div class="art-sheet-body">
<?php echo art_placeholders_output(render($top1), render($top2), render($top3)); ?>
<?php if (!empty($navigation) || !empty($extra1) || !empty($extra2)): ?>
<div class="art-nav">
    <div class="l"></div>
    <div class="r"></div>
	<div class="art-nav-center">
    <?php if (!empty($navigation)) : ?>
    <?php echo render($navigation); ?>
    <?php endif; ?>
    </div>
</div>
marc.groth’s picture

Not sure if this will help anyone but I was also having issues with this even after trying all the suggested fixes.

The way I got it to work was to remove all print_r() debug code I had. The moment I removed it, it worked perfectly fine without any errors - in all browsers! Must be something to do with the headers being altered before output or something along those lines...

Anyway, hopefully this helps someone else out!

vlooivlerke’s picture

My like button and fb comments are not showing in ie7, It does work in ie8, FF and chrome

amandabutz’s picture

What if the theme you're using doesn't have a page php file? How do you get the like buttons to show up with IE?

virtuali1151’s picture

I have tried the below with IE9 and nogo. I am using fb_social beta 8


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://www.facebook.com/2008/fbml" xmlns="http://www.w3.org/1999/xhtml" lang="<?php echo $language->language; ?>" xml:lang="<?php echo $language->language; ?>">

Fixed.. had to turn off block caching.

TempusFugit’s picture

Version: 6.x-1.0-beta4 » 6.x-1.0-beta8

I have the same problem as #32: works fine in IE8, but doesn't show up in IE6 & IE7 (and in IE8 & IE9 compatibility modes)

vlooivlerke’s picture

Works fine in FF, Chrome IE8 but not in IE6 & 7 and Safari

IE7 Reports the problem lies here in the last line of this code

<div id="fb-root"></div><script type="text/javascript">
     window.fbAsyncInit = function() {
       FB.init({
         appId: "00000000000000",
         status: true, 
         cookie: true,
         xfbml: true,
         channelUrl: "http://bla-bla.com/fb_social/channel",
       });

It is having problem with either the } or the ) in that last line

pedrobrito’s picture

Same as #33 here. I have a Zen sub-theme that doesn`t have the page.tpl file.
Where should I add the code then?

harris_david’s picture

I was able to make this work in ie 6 & 7 by removing a comma in the fb_social.module file. I removed the comma after the channelUrl line ;

$output .= "

window.fbAsyncInit = function() { FB.init({ appId: " . drupal_to_js($appid) . ", status: true, cookie: true, xfbml: true, channelUrl: " . drupal_to_js($channel_url) . " }); Once I did this, the buttons began appearing in 6 and 7 (I.E 8 was never a problem). I'm using Adobe Browser Labs for testing, so I can't speak to the Java errors.
harris_david’s picture

As for the Zen Sub-theme, you just need to copy the page.tpl.php file from the Zen Templates folder into the root of your sub-theme.

Zen >> Templates >> page.tpl.php

You may have to clear caches to recognize the new file. Also, clear caches after making changes to the page.tpl.php as well.

mcjim’s picture

Status: Active » Needs review

Well spotted, harris_david. Looks like this has been committed to dev.

Can confirm the fix works.

ferdi’s picture

Status: Needs review » Fixed

Fixed in beta9

Status: Fixed » Closed (fixed)

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

laraz’s picture

#34 fixed for me.

muhammad.tanweer’s picture

This works .. If not, may be you have to clear cache from drupal performance.

Muhammad

sammym’s picture

#34 fixed it for me as well

venusrising’s picture

Status: Closed (fixed) » Active

No longer working well in Firefox OR Chrome. Anyone have any ideas. Turning off block caching is not an option on a production site.

venusrising’s picture

Sorry its Beta 9 issue

vlooivlerke’s picture

I realised today that the facebook like and share button is missing in Chrome.

IE, Firefox works fine.
It used to work fine in Chrome.

vlooivlerke’s picture

Today it is back working in chrome again. did not do anything nor cleared any cache.
Must be Facebook or Chrome doing some update.

DamienMcKenna’s picture

You should check how metatag does it:

function metatag_opengraph_preprocess_html(&$variables) {
  // The RDF module adds the Open Graph namespace itself.
  // @see rdf_rdf_namespaces()
  if (!module_exists('rdf')) {
    $variables['rdf_namespaces'] .= "\n  xmlns:og=\"http://ogp.me/ns#\"";
  }
}
DamienMcKenna’s picture

Skip #50, it isn't needed with the current implementation that uses normal DIV tags.

DamienMcKenna’s picture

Version: 6.x-1.0-beta8 » 7.x-2.0-beta4

What I've found to cause problems is loading the FB Javascript at the bottom of the page causes the button to not load on Firefox (confirmed in Firefox 8, possibly other versions too). Changing fb_social_page_alter() from:

  $page['page_bottom']['fb_social'] = array(
    '#markup' => $output 
  );

to

  $page['page_top']['fb_social'] = array(
    '#markup' => $output 
  );

makes it work. FYI the Facebook JS API documentation specifically states

The best place to put this code is right after the opening <body> tag.

DamienMcKenna’s picture

Status: Active » Needs work
FileSize
2.83 KB

This patch introduces a new setting to control where the fb-init code is added. The new default is to load the code at the top of the page, with the setting allowing the current (incorrect) output to be done.

DamienMcKenna’s picture

FYI someone will need to backport this to D6.

DamienMcKenna’s picture

Status: Needs work » Needs review
ferdi’s picture

Committed http://drupalcode.org/project/fb_social.git/commit/cd73e9b, thanks!

I dont know how this can be backported to D7 though.

DamienMcKenna’s picture

Status: Needs review » Needs work

Gah, it isn't working for me now :-\

DamienMcKenna’s picture

Status: Needs work » Fixed

@ferdi: Sorry for changing the status.

Further research uncovered the fact that the themer on our site had munged up the CSS which was causing our problems with the block hiding. I think everyone should try testing the fblike button plain & without any CSS tweaks in all browsers before blaming the plugin.

Status: Fixed » Closed (fixed)

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