Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
jkristos CreditAttribution: jkristos commentedSame problem here - no button in IE (tested in XP IE7)
Comment #2
ahansen1 CreditAttribution: ahansen1 commentedHave you added xmlns:fb="http://www.facebook.com/2008/fbml" to the HTML element in your theme?
Comment #3
apmsooner CreditAttribution: apmsooner commentedYup, 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.
Comment #4
Dave Cohen CreditAttribution: Dave Cohen commentedThe 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.
Comment #5
jkristos CreditAttribution: jkristos commentedThe 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?
Comment #6
ahansen1 CreditAttribution: ahansen1 commentedI'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.
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?
Comment #7
apmsooner CreditAttribution: apmsooner commented<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?
Comment #8
apmsooner CreditAttribution: apmsooner commentedAlso 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'
Comment #9
Dave Cohen CreditAttribution: Dave Cohen commentedAre 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.
Comment #10
apmsooner CreditAttribution: apmsooner commentedThanks 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!
Comment #11
Dave Cohen CreditAttribution: Dave Cohen commentedI'm curious what module conflicts with it?
Comment #12
apmsooner CreditAttribution: apmsooner commentedhttp://drupal.org/project/jq_maphilight
Comment #13
Dave Cohen CreditAttribution: Dave Cohen commentedthanks.
Comment #14
apmsooner CreditAttribution: apmsooner commentedOkay, 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?
Comment #15
Dave Cohen CreditAttribution: Dave Cohen commentedYou 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.
Comment #16
apmsooner CreditAttribution: apmsooner commentedNope, 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?
Comment #17
Dave Cohen CreditAttribution: Dave Cohen commentedEither 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.
Comment #18
apmsooner CreditAttribution: apmsooner commentedOkay 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.
Comment #20
Miquel Carol CreditAttribution: Miquel Carol commentedSorry, 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; ?>">
Comment #21
garycarlyle CreditAttribution: garycarlyle commentedI 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
Comment #22
dmsbilas CreditAttribution: dmsbilas commentedI 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.