FB.ui无法在IE 10兼容模式下工作

时间:2015-01-28 10:59:52

标签: facebook internet-explorer

与往常一样,此代码在所有其他浏览器和IE非兼容模式下工作得更好,但在兼容模式下,代码会产生以下错误:

SCRIPT1028: Expected identifier, string or number 

     FB.ui(
     {
        method: 'share',
        href: 'http://www.example.com',
     },
     //Here is where the error points to
     function(response) 
     {
        if (response && !response.error_code) 
        {

        } 
     });

到底出了什么问题?

1 个答案:

答案 0 :(得分:0)

对象定义中有错误的逗号:

FB.ui(
     {
        method: 'share',
        href: 'http://www.example.com', // <-- remove this comma
     },