I am trying to integrate Facebook login to my site using the JavaScript Javascript SDK. Following the step-by-step instructions provided in the Facebook Developer document here , here is the test code I wrote:
<script> window.fbAsyncInit = function() { FB.init({ appId : '{$MY_APP_ID}', cookie : true, </script> <button onclick="fblogin()">login</button> <script src="//connect.facebook.net/en_US/sdk.js"></script>
Sorry, due to the domain restriction of the website, I cannot accept this to play. But I tried in my domain, the Facebook login window appeared in Chrome and Firefox, but Safari blocked it. It's weird, is there something wrong with the code snippets provided by the Facebook Developer Document?
David source share