IE / Facebook Issue : Why Facebook Like box not display in Internet Explorer6 - IE8 ?
Posted
by Vaibhav Bhalke
on Stack Overflow
See other posts from Stack Overflow
or by Vaibhav Bhalke
Published on 2010-06-03T14:03:09Z
Indexed on
2010/06/03
14:04 UTC
Read the original article
Hit count: 972
Now My final Application.html file contains are
< !DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/DTD/strict.dtd">
< html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml">
< head>
< meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
< /head>
< body>
< script type="text/javascript" language="javascript" src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php"> < /script>
< script type="text/javascript"> FB_RequireFeatures(["Connect"], function(){ var x=1; } ); < /script>
< script src="http://static.ak.connect.facebook.com/connect.php/en_US" type="text/javascript"> < /script>
< /body> < /html>
My Java code for LIke Box is as follows FBPageFanWidget.java
class FBPageFanWidget extends Composite {
public FBPageFanWidget() { VerticalPanel mainPanel = new VerticalPanel(); mainPanel .getElement() .setInnerHTML( "< script type='text/javascript' src='http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php/en_US'>< /script>< script type='text/javascript'>FB.init('');< /script>< fb:fan profile_id=\"113106068709539\" stream=\"0\" connections=\"10\" logobar=\"0\" width=\"244\" height=\"240\" css='http://127.0.01:8080/webapplicationname/facebook.css?1'>< /fb:fan>");
initWidget(mainPanel);
}
}
We used proper facebook API_KEY & PAGE_ID
It's very important for us to Show Facebook like Box in Our web application Because we have more IE users.
If we add FBPageFanWidget.java in our web applicaton then Our Home page is not display in IE because we add Facebook LikeBox
so we made changes in Our FBPageFanWidget.java
class FBPageFanWidget extends Composite {
public FBPageFanWidget() {
VerticalPanel mainPanel = new VerticalPanel();
if (!isIE())
{
mainPanel.getElement()
.setInnerHTML("<script type='text/javascript' src='http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php/en_US'></script><script type='text/javascript'>FB.init('');</script><fb:fan profile_id=\"113106068709539\" stream=\"0\" connections=\"10\" logobar=\"0\" width=\"244\" height=\"240\" css='http://127.0.01:8080/webapplicationname/facebook.css?1'></fb:fan>");
} initWidget(mainPanel); }
public native String getUserAgent() /-{ return navigator.userAgent; }-/;
private boolean isIE() {
return (getUserAgent().indexOf("MSIE") > -1);
}
}
when we did this changes Then Facebook Like Box display in every browser excluding IE6 - IE8 :(
and also display Our Home page in IE8 excludeing Facebook Like Box.
It means There is probelm in IE ? or what changes i need to do in my html file or java file to show facebook like Box properly with displaying our home page
It's very important for us to Show Facebook like Box in Our web application Because we have more IE users.
Please Reply ASAP.
Hope-for Best Co-operation from your side !!!!
© Stack Overflow or respective owner