admin管理员组

文章数量:1334342

I'm trying to get my app to work in Facebook canvas. To the moment, I successfully log-in to facebook, but after that, I need to redirect my app so I can get the user to be logged in my app.

When trying to do this what I get is:

Refused to display ';state=7…edirect_state%3D7EdHoAcZYlnIaURuz1YI8sbRhxhBg2iM&client_id=420498651348242' in a frame because it set 'X-Frame-Options' to 'DENY'.

How can I overe this restriction from Facebook?

I'm trying to get my app to work in Facebook canvas. To the moment, I successfully log-in to facebook, but after that, I need to redirect my app so I can get the user to be logged in my app.

When trying to do this what I get is:

Refused to display 'https://www.facebook./dialog/oauth?scope=email%2Cpublish_actions&state=7…edirect_state%3D7EdHoAcZYlnIaURuz1YI8sbRhxhBg2iM&client_id=420498651348242' in a frame because it set 'X-Frame-Options' to 'DENY'.

How can I overe this restriction from Facebook?

Share Improve this question asked Feb 26, 2014 at 12:19 SascuashSascuash 3,84111 gold badges49 silver badges67 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 4

To redirect you must add to that string the redirect_uri parameter.

But it looks like you are trying to open the fb login page inside the canvas. You can't show the facebook login page inside an iframe. It's not allowed, and thats what X-Frame-Options=DENY means. You should use the fb popup log in.

See the display option: https://developers.facebook./docs/reference/dialogs/oauth/

I hope this will help.

本文标签: