OAuth dialog doesn't work inside Facebook ifra

2019-05-29 04:05发布

The page is question is https://apps.facebook.com/gentlemensbet/ The 'Begin Betting' button won't load the oauth screen for anyone.

However, if you open it in a new window, it seems to work just fine. I can't find any reasonable explanation for this behavior and don't know how to correct this.

1条回答
Explosion°爆炸
2楼-- · 2019-05-29 04:40

Add target="_blank" or target="_top" to your anchor tag. You are trying to load a facebook URL in an iframe within a facebook page. That isn't permitted.

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

is the error logged in the console. It is a preventive measure against click-jacking.

Your link should be:

<a class="btn btn-large btn-primary" href="https://www.facebook.com/dialog/oauth?..." target="_blank"></a>
查看更多
登录 后发表回答