IE/Facebook的问题:为什么 实样箱无法在Internet Explorer6显示 - IE8?IE/Facebook问题:为什么Facebook Like框不会显示在Internet Explorer 6 - IE8中?
Facebook的样箱显示throgh上除IE-IE8每一个浏览器我的web应用程序
现在最终Application.html文件包含有
< !DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/DTD/strict.dtd"><BR>
< html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml">
<BR>< head>
< meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
< /head><BR>
< body>
< script type="text/javascript" language="javascript" src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php"> < /script> <BR>
< script type="text/javascript"> FB_RequireFeatures(["Connect"], function(){ var x=1; }); < /script> <BR>
< 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);
}
}
当我们做这个改变然后在每一个Facebook的样箱显示浏览器IE6除外 - IE8 :(
,也显示我们在IE8主页excludeing Facebook的样箱
意思s在IE中有probelm?或者我需要在我的html文件或java文件中做什么更改,以显示我们的主页,以正确显示Facebook框。
在我们的Web应用程序中显示Facebook像框一样非常重要因为我们有更多的IE用户。
请尽快回复。
希望,从你身边最好的合作!!!!
因为IE6-8不是真正的浏览器。 – stagas 2010-06-05 12:44:55
@stagas IE8-IE8的用户更多! :) IE8有18%的市场在世界 – StackOverFlow 2010-06-08 18:15:29
这是[反驳](http://en.wikipedia.org/wiki/Counterargument)?你有没有试过在IE6-8上开发? – stagas 2010-06-08 21:04:39