按钮在 IE8 中不起作用
这个问题真的要了我的命,我已经在谷歌上搜索了很长时间,但我找不到答案。
问题是我的 LIKE 按钮不会在 IE8 (internet explorer 8) 上呈现,但会在 chrome 上显示。
这是测试页面的 URL: http://78.69.194.141/vinn/test.php
如果您使用的不是 IE8,应该会在“h5 header”下看到一个类似按钮。
这是相关的代码:
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml" xml:lang="en" lang="en">
<link rel="stylesheet" type="text/css" href="fbstyle.css" />
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js"></script>
<script>
FB.init({
appId : '195633697119592',
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true, // parse XFBML
channelURL : 'http://78.69.194.141/vinn/channel.html', // channel.html file
oauth : true // enable OAuth 2.0
});
FB.UIServer.setLoadedNode = function(a,b){FB.UIServer._loadedNodes[a.id]=b;};
</script>
和按钮:
<fb:like layout="button_count"></fb:like>
我尝试了很多不同的方法,加载js异步以及互联网上提到的所有其他方法,但都有结果。
看来这个问题只发生在我的服务器上,因为那些类似的按钮可以在其他地方使用,并且具有完全相同的代码(据我所知)。
有人有任何线索吗?
This problem is really killing me, I have been googling for a VERY long time now and I just CAN'T find the answer to this.
The problem is that my LIKE button does not render on IE8 (internet explorer 8) but it does show on chrome.
Here is a url to a test page:
http://78.69.194.141/vinn/test.php
If you are using not using IE8 you should see a like button under "h5 header".
This is the related code:
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml" xml:lang="en" lang="en">
<link rel="stylesheet" type="text/css" href="fbstyle.css" />
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js"></script>
<script>
FB.init({
appId : '195633697119592',
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true, // parse XFBML
channelURL : 'http://78.69.194.141/vinn/channel.html', // channel.html file
oauth : true // enable OAuth 2.0
});
FB.UIServer.setLoadedNode = function(a,b){FB.UIServer._loadedNodes[a.id]=b;};
</script>
and the button:
<fb:like layout="button_count"></fb:like>
I've tried many different ways, loading the js async and every other way mentioned on internet but with results.
It seems like this problem only occurs on my server though, because those like buttons work on other places, with EXACT same code (afaik).
Does anyone have ANY clue?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(3)
IE8 抛出此错误:
它指的是 facebook 替换
标记的 iframe,这表明按钮的设置选项错误,或者存在无效的 HTML页面上的 DOM 混乱,因此 JavaScript 无法找到 iframe。http://validator.w3.org/check?verbose=1&uri=http%3a%2f%2f78.69.194.141%2fvinn%2ftest.php
一个很好的起点将放入
和
标签。
IE8 throws this error:
It's referring to the iframe which facebook replaces the
<fb:like>
tag with which suggests that either the setup options for the button are wrong, or there is invalid HTML on the page which is messing up the DOM so the JavaScript can't find the iframe.http://validator.w3.org/check?verbose=1&uri=http%3a%2f%2f78.69.194.141%2fvinn%2ftest.php
A good place to start would be to put in
<head>
and<body>
tags.您似乎将
标签和
元素混合在一起,并且没有正确定义这些部分。您需要
标记(可能还有一些
标记)的
部分和
>
部分,用于You seem to be mixing
<head>
tags and<body>
elements together and not defining the sections properly. You need a<head>
section for the<link>
tag (and possibly some<script>
tags) and a<body>
section for elements like<div>
. As it stands, your page is not valid HTML.我有同样的问题。尝试将
xmlns:fb="http://www.facebook.com/2008/fbml"
添加到标记,如下所示:
I had the same issue. Try to add
xmlns:fb="http://www.facebook.com/2008/fbml"
to<html>
tag, like this:绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!