Skip to content Skip to sidebar Skip to footer

Loading The Facebook Api In Jsfiddle

I want to be able to load the Facebook API inside JSFiddle. This is my current attempt. When I run: window.fbAsyncInit = function() { FB.init({ appId: 'event-test', xfbml

Solution 1:

I don't know much about the Facebook login API. However, I do understand why you are getting the error message.

If you were to put your code inside a file on your computer's hard drive without jsfiddle, it should work.

Short answer: There is no way to get this to work with your current setup on jsfiddle. You can try looking for an alternative Facebook API if Facebook has a different API available that does the same thing.

Long answer: Sandbox is an attribute that be assigned to the iframe tag for security measures for the parent page. JsFiddle uses sandbox to provide security to the parent page. Your fiddle results are loaded into an iframe that looks like this:

<iframename="result"sandbox="allow-forms allow-popups allow-scripts allow-same-origin allow-modals"frameborder="0"src="//fiddle.jshell.net/casebash/j26bq6qf/11/show/"></iframe>

Facebook just doesn't want their API to run within a Sandboxed iframe.

Post a Comment for "Loading The Facebook Api In Jsfiddle"