I added the facebook code to page.tpl.php...

print $language->language; " xml:lang=" print $language->language; " xmlns:fb="http://www.facebook.com/2008/fbml">

Login button shows on firefox but not on IE. It used to show on IE prior to upgrading DFF to current version. Is there something I'm missing here? I've cleared caches, etc... no button in IE.

Comments

jkristos’s picture

Version: 6.x-2.0-beta7 » 6.x-2.0-beta10

Same problem here - no button in IE (tested in XP IE7)

ahansen1’s picture

Have you added xmlns:fb="http://www.facebook.com/2008/fbml" to the HTML element in your theme?

apmsooner’s picture

Yup, added to page.tpl.php and even viewed outputted source html and code is in there. Just doesn't show up however on the page output.

Dave Cohen’s picture

The footer of your page source you should see some facebook-specific javascript. Is that there?

If there's some other error in your javascript, its possible that prevents facebook js from running. Try firebug and see if any errors on the page.

jkristos’s picture

The FB js appears in source yes and this works fine in other browsers.

You mean maybe something only prevents it from running in IE? Not sure I follow there. I tried it anyhow, and as expected everything is fine (no js errors in firebug) when loading the page in Firefox - which was working fine, as stated in the original post.

Does the button appear for you if you test in the browser in question: IE7(or 6)/XP?

ahansen1’s picture

I'm guessing we're still on the same page, but I wasn't sure from your response. I just wanted to make sure that the source you're ensuring is there is the namespace on the HTML element, e.g.

<html xmlns:fb="http://www.facebook.com/2008/fbml"  xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

Without this, I get the same problem you describe in IE. With this, it works fine in IE for me. Although, I don't have IE 7, I'm looking in IE 8. The button is on the top center of http://www.drupalforfacebook.org/. Do you see it there in your IE 7?

apmsooner’s picture

<html xmlns:fb="http://www.facebook.com/2008/fbml" xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

This is what I have... same as what you posted and I'm on IE8. Do I need the FBML theme uploaded for it to work even though I'm not using canvas pages?

I looked at drupalforfacebook.org in IE and see the login button. My source matches Dave's. I'm not sure why mine aint happening... any other ideas?

apmsooner’s picture

Also for some reason now, I get an error saying facebook client api not found. I uncommented this line from dave's instructions in settings.php and still not being found.

$conf['fb_api_file'] = 'facebook-platform/php/facebook.php'; // default is 'facebook-platform/php/facebook.php'

Dave Cohen’s picture

Are you seeing the message on the status report page, described here?
http://drupal.org/node/724706#comment-2841546

If so the api libs are being included. Its the error message that is a problem.

For the button not showing up... I think the javascript is rather fragile. Any error in javascript could prevent it from working. Even a syntax error or bad attribute in an FBML tag. So try firebug and see if it reports any errors when the page loads.

apmsooner’s picture

Thanks for the link, my path wasn't specific enough for client libs so thats fixed. The login button works now too as I disabled a module that was conflicting with it.
Thanks!

Dave Cohen’s picture

I'm curious what module conflicts with it?

apmsooner’s picture

Dave Cohen’s picture

Status: Active » Fixed

thanks.

apmsooner’s picture

Okay, so what about the facebook connect login block? Would I need to put code in block.tpl.php for the login button to render in IE? If so... what code and where would it go?

Dave Cohen’s picture

You only need to add the attribute to your html element in page.tpl.php. You don't need to do anything more for the login block.

apmsooner’s picture

Nope, that doesn't work for me. I've gotten past the code in the page.tpl.php and the button shows in IE now but as Facebook Connect block, the button doesnt show in IE or firefox. I basically just added the block to top of user/register page. Here is the code in the block body with input format set to full html:
<p><fb login-button="" v="2"><fb intl="">Connect with Facebook</fb></fb></p>

Any other ideas as to what could be going wrong here?

Dave Cohen’s picture

Either you didn't paste your code properly, or your using a tag called <fb>, which doesn't exist.

Try undoing any block config changes you've made. If the default works, the problem is with your customization.

apmsooner’s picture

Okay cool, I think FCKeditor may have messed up the field to begin with. I copied the suggested code below the fields over and works fine now. Thanks.

Status: Fixed » Closed (fixed)

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

Miquel Carol’s picture

Sorry, but better if you use the drupal language variable for this, and works with any language. (for likeboxes and rest of social plugings ;)

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

garycarlyle’s picture

I have a problem like this too.

Inside my Facebook application, the canvas page being displayed in Facebook, that I am using as a test. The connect button displays. But, it does not when the page is viewed directly in ANY browser.

Please help.

According to Firebug this is the code that is being displayed by the template in source code.

<html lang="en" xmlns:fb="http://www.facebook.com/2008/fbml" 52="" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" 53="" dir="ltr" class="js"><head>

~Gary

dmsbilas’s picture

I was suffering from this problem in IE7 and IE8 . Now it is solved by doing following thing.

first you have to add following code inside your tag in your page.tpl.php file.

xmlns:fb="http://www.facebook.com/2008/fbml" xmlns="http://www.w3.org/1999/xhtml" xml:lang=" print $language->language; " lang=" print $language->language; " dir=" print $language->dir; "

so , it seems like:


print $language->language; " lang=" print $language->language; " dir=" print $language->dir; ">

I hope, now your problems are solved for IE8 and IE7 and earlier IE versions.

Thank you all
Bilas Siddiq
Senior Developer
Launch Interactive Media
Austin, Texas,
United States.