Facebook登录/喜欢在IE8上失败 [英] Facebook Login/Like Fail on IE8

查看:175
本文介绍了Facebook登录/喜欢在IE8上失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近使用XFBML实现了Facebook登录按钮和Facebook赞按钮。您可以在 http://colnect.com 上查看该网站

I've recently implemented Facebook Login button and a Facebook "Like" button using XFBML. You can see the site on http://colnect.com

一切都适用于FireFox,Chrome,Opera& Safari。

Everything works well with FireFox, Chrome, Opera & Safari.

但是,IE既没有显示登录或喜欢按钮也没有显示错误消息。

However, IE doesn't show neither "login" or "like" buttons and no error message is available as well.

任何想法?

推荐答案

似乎我会成为那种回答自己希望的人ll帮助某人。

Seems I'll be the kind of person to answer himself hoping it'll help someone.

要让Internet Explorer识别Facebook,你应该添加

For Internet Explorer to recognize Facebook you should add

xmlns:fb="http://www.facebook.com/2008/fbml"

到你的html标签,对我而言

to your html tag, for me it's

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

我遇到的第二个问题是IE不支持Array.indexOf()所以这就是方式它周围:

The second problem I had was that IE doesn't support Array.indexOf() so here's the way around it:

if(!Array.indexOf){
  Array.prototype.indexOf = function(obj){
          for(var i=0; i<this.length; i++){
              if(this[i]==obj){
                  return i;
              }
          }
      return -1;
  }
}

希望有所帮助。

这篇关于Facebook登录/喜欢在IE8上失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆