Facebook App Error forbidden by X-Frame-Options

后端 未结 2 1564
醉梦人生
醉梦人生 2021-01-26 00:59

I am building a facebook app currently it is in sandbox mode. My code :-

index.php



        
相关标签:
2条回答
  • 2021-01-26 01:25

    Instead of header redirect use JS redirect as

    <script>top.location.href="THE URL"</script>
    
    0 讨论(0)
  • 2021-01-26 01:32

    You can not display the login dialog within any kind of frames – that’s an anti-phishing measure, the user is supposed to be always able to verify that the login dialog they are shown is indeed from facebook.com, and not a fake loaded from any other site.

    You have to redirect to it in the top window instance. This can not be done server-side, so you have to use JavaScript:

    <script>top.location.href = "…";</script>
    
    0 讨论(0)
提交回复
热议问题