FB.login call popup is not allowed
Hi,
I have added the plugin correctly and when I tried to login with facebook, I am getting a console error 'Refused to display 'https://www.facebook.com/v2.7/dialog/oauth...' in a frame because it set 'X-Frame-Options' to 'DENY'.
Please help me to solve this issue.
Hi, are you using this plugin inside an iframe ?? Can you please share your code .
Hi,
I am not using using this plugin inside an iframe. Here is my code
- Added button in my html page with the directive name
<button fb-login type="button">facebook Login</button> - Added module in my js and configured the key
var angularApp = angular.module('myApp', ['socialLogin']); angularApp.config(function(socialProvider){ socialProvider.setFbKey({appId: "xxxx", apiVersion: "v2.8"}); });
When I opened my html page and clicked the button, it shows that error message in my console. Please correct me if I am doing anything wrong?
Note: I have not logged into my facebook in the browser.
Did you add any X-Frame-Options ? There is no problem in the code. Look at this - https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options FB opens a frame to authenticate. Ensure that your code has not set X-Frame-Options to DENY in header or metatags.
@kpsrinivas X-Frame options is already disabled in my apache server. On inspecting fb oauth dialog call in Network Tab, in Response header it is set as 'X-Frame-Options to DENY'. I think it is issue with fb. Is there any other way to fix this?

Are you using this in a "frame" tag ? If yes please move it to outside.
You mean directive in a button?
<button fb-login type="button">facebook Login</button>
No. Button inside frame tag.
<frame>
...
<button fb-login type="button">facebook Login</button>
...
</frame>
No. I am not using this inside a frame tag.
Hmmm. But the error is very clear FB will not allow <frame>, <iframe> tags, here error is saying that you are using <frame> tag.
okay. I will further check on this and will post my solution.
Try this. Add X-Frame-Options in your angular header. http://stackoverflow.com/questions/33144580/configuring-x-frame-options
Hi,
When I tried to use this plugin in a sample angular app, popup is working fine. So I think this issue is with my existing angular app.
One question: I am using "ui-view" in my index html and rendering the templates based on the route. Will that be the cause of my issue?
No. Not at all.
Have you tested in the same browser ?