Can the FB API be used in Codepen?

Evening all,
My random quote generator is still a work in progress, but I wanted to see if this was possible at all. I added a FB post button here, which will first prompt you to log in to facebook, and then post the quote to your wall. However, when running this via Codepen, I receive an error such as this:

Uncaught DOMException: Failed to set the 'domain' property on 'Document': Assignment is forbidden for sandboxed iframes.

After doing some googling, it doesn’t look like it’d be possible and I have been able to post on my own local host so it shouldn’t be the code itself. Is there a way from Codepen (or other sandboxed iframes) that this would be possible?


From what I understand from a quick couple of minutes (very quick so I might be explaining it wrong) of reading is codepen doesn’t allow iframes and this Facebook API creates an iframe for the share window. This will work in a site not hosted/created in codepen. So what you can do is fake this action by creating a new pop up window to mimic the iframe with the facebook share page. I created a small codpen to show you how.