Refused to display document because display forbidden by X-Frame-Options

后端 未结 3 1466
我寻月下人不归
我寻月下人不归 2021-01-01 13:30

I\'m building a Facebook app and I have noticed that when attempting to get the login status of the user using their Javascript API, I sometimes get the error:

\"Ref

3条回答
  •  余生分开走
    2021-01-01 14:16

    Does this javascript work?

    document.write(isFacebookPage()?"YES, I'm in a Facebook Page!":"No, not a Facebook Page");
    
    function isFacebookPage(){
        return (document.location.href.indexOf('/pages/')>0);
    }
    

提交回复
热议问题