Reputation: 75
I'm trying to use Facebook connect in an IFrame. It seems that after the user finishes authenticating and granting my app permissions the Facebook cookies aren't saved on the browser.
1) The user presses the connect button inside my Iframe.
2) The user is authenticate with FB Connect.
3) User grants permissions for my app.
4) The iframe page is refreshed, but the server side API still doesn't return a user-The Facebook cookies aren't in the browser (I think that's the problem)
5) Server displays the logged out page again and the FB Connect JavaScript identifies the user as being logged out.
6) On some browsers, refreshing the IFrame content fixes this issue.
If I load the iframe url in its own window, outside of the iframe, everything works.
I've been trying to solve it for two days now. Please help!
Thanks
Upvotes: 5
Views: 4946
Reputation: 1014
Facebook has javascript code (at least in the api-related pages) that checks whether it's being loaded in an iframe and disables the page. I think this is to prevent clickjacking.
Facebook doesn't want you to do what you're trying to do. Use a popup window instead.
Upvotes: 3