FB.login using display as iframe

Go To StackoverFlow.com

1

I know that facebook has recently changed the code so that the login credential will be given in the popup window of facebook.com Or redirect to facebook.com

But i need to make the FB.login in the iframe on the same page because what i am doing ther eis form submiossion by user on my application. If user has entered some data and he is not logged in then on the page itseld the user is asked to login on facebook using popup window. But for safari the popup are blocked. So this make inconvenient.

2012-04-04 04:30
by Madan


0

this is because getLoginStatus overrides the user acrtion which kills the window popup.

2012-04-13 09:17
by neetu


1

The call to FB.login() should be in an onclick handler, then popup blockers will not kill it.

FB login in an iframe is not possible because several browsers impose stricter restrictions on setting cookies in iframes than what they do in popups. It would also be more vulnerable to clickjacking and password theft.

2012-04-04 04:34
by Nathan Friedly
i am using $("#someid").click(function(){ // FB.login code here} so this should work. But its not working if popup window is blocked. popup window is clicked even in onclick handler - Madan 2012-04-04 04:42
That's strange. Can you post the exact code - Nathan Friedly 2012-04-04 18:40
Hi Nathan, I agree with you...FB.login on onclick solves the problem. After debugging what I found is calling FB.login inside FB.getLoginStatus() cause the pop window block. I have resolved this issue now.. thanks for your help - Madan 2012-04-05 11:20
Ads