I'm trying to set up a "like gate" where a user has to like a page before seeing certain content on a website (not on Facebook itself). I've found some great resources on SO an elsewhere on how to do it, but I'm running into an issue with http
vs. https
. My site is not loaded over https, but the Facebook login popup is. The error:
Uncaught SecurityError: Failed to read the 'contentDocument' property from 'HTMLIFrameElement': Blocked a frame with origin "http://yoursite.com" from accessing a frame with origin "http://static.ak.facebook.com". The frame being accessed set "document.domain" to "facebook.com", but the frame requesting access did not. Both must set "document.domain" to the same value to allow access.
I'm currently using the code here: https://github.com/vavrecan/facebook-fangate, but have also found this answer useful.
How can I show a user content only if they've liked a specific Facebook page, without using https?