Why FB.getLoginStatus doesn't work in IE7?

后端 未结 2 1390
忘了有多久
忘了有多久 2021-02-04 17:01

I am using FB.getLoginStatus for an application in Facebook. This works fine in all the browsers, including IE8. But it doesn\'t work for IE7. My code is:



        
2条回答
  •  醉梦人生
    2021-02-04 17:45

    According to the documentation at http://developers.facebook.com/docs/reference/javascript/fb.init/, the proper solution is to create a file on your web server (for instance channel.html) containing just:

     
    

    And then specifying the absolute URL to your channel.html in your init options:

     

    For convenience in deployment, I use the following to calculate my channelUrl.

     var curLoc = window.location;
     curLoc.protocol + "//" + curLoc.hostname + ":" + curLoc.port + "/channel.html"
    

提交回复
热议问题