Internet Explorer中出现FB.login错误



我使用connect-js(FB.login)以标准方式登录用户以共享我的页面。在所有普通浏览器(chrome、firefox、opera)中,它都会弹出一个带有权限请求的窗口(一切都很好)。但在Internet Explorer(7和8,没有在6中测试)中,它会弹出一个窗口,上面写着:"myapp出现错误。请稍后再试。"

这是我的代码:

<div id="fb-root"></div>
<script language="javascript">
var nombre = "";
var pic_big = "";
FB.init({
    appId       :   '161599150607341', // App ID
    channelUrl  :   '//emocionesverde.com/channel.html', // Channel File
    status      :   true, // check login status
    cookie      :   true, // enable cookies to allow the server to access the session
    xfbml       :   true  // parse XFBML
});
function conectarse() {
    FB.login(handleSessionResponse, {
        scope: 'publish_stream, user_about_me'
    });
}
function handleSessionResponse(response) {
    if (response.authResponse) {
        FB.api('/me', function(response) {
            //console.log(response.name);
            window.nombre = response.name;
            getUserPic(response.id);
        });
    }
}
function getUserPic(uid) {
    FB.api('/me?fields=picture&type=large', function(response) {
        //console.log(response.picture);
        window.pic_big = response.picture;
        publicar();
    });
}
function publicar() {
    FB.ui({
        method: 'stream.publish',
        message: '',
        attachment: {
            name: 'Emoción es Verde',
            caption: window.nombre + '  midió el impacto de sus acciones verdes. Te invitamos a conocer acciones para mantener el planeta verde con Emoción es Verde',
            media: [{
                type: 'flash',
                swfsrc: 'http://mainteractivetools.com/erik/mifb/emocionesverde/Prueba.swf?pic=' + window.pic_big + '&nombre=' + window.nombre,
                imgsrc: 'http://mainteractivetools.com/erik/mifb/emocionesverde/telefonica1.jpg',
                expanded_width: '450',
                expanded_height: '258'
            }],
            href: 'http://www.emocionesverde.com'
        },
        action_links: [{
            text: 'Emoción es Verde',
            href: 'http://www.emocionesverde.com'
        }],
        user_message_prompt: 'Escribe un comentario'
    }, function (response) {});
}
$('#swfmapsdiv').css('visibility', 'hidden');
</script> 

您尝试添加p3p标头了吗?这是一个IE的东西,可以解决很多问题。无论代码多么神秘。脸书本质上试图做的是跨域共享cookie,这是一个安全标志。你需要说它是好的。

问题可能在channelUrl中,请尝试在那里找到整个路径,即http://emocionesverde.com/channel.html

同样以应用程序开发人员的身份登录到facebook-错误消息将更详细的

最新更新