<?php
/*
 * @link https://developers.facebook.com/docs/javascript/quickstart
 */

if (!isset($this->locale)) {
    $this->locale = 'en_US';
}

?>
<div id="fb-root"></div>
<script type="text/javascript">
    <!--
    window.fbAsyncInit = function () {
        FB.init({
            appId: '<?php echo $this->appId?>',
            status: <?php echo (isset($this->status) && $this->status ? 'true' : 'false')?>,
            xfbml: <?php echo (isset($this->xfbml) && $this->xfbml ? 'true' : 'false')?>,
            version: '<?php echo (isset($this->version) ? $this->version : '')?>'
        });
        <?php echo isset($this->fbAsynchInitHook) ? $this->fbAsynchInitHook : ''; ?>
    };

    (function (d, s, id) {
        var js, fjs = d.getElementsByTagName(s)[0];
        if (d.getElementById(id)) {
            return;
        }
        js = d.createElement(s);
        js.id = id;
        js.async = <?php echo (isset($this->async) && $this->async ? 'true' : 'false')?>;
        js.src = "//connect.facebook.net/<?php echo $this->locale?>/sdk.js";
        fjs.parentNode.insertBefore(js, fjs);
    }(document, 'script', 'facebook-jssdk'));
    -->
</script>
<?php
/*
 * @link https://developers.facebook.com/docs/javascript/quickstart
 */

if (!isset($this->locale)) {
    $this->locale = 'en_US';
}

?>
<div id="fb-root"></div>
<script type="text/javascript">
    <!--
    window.fbAsyncInit = function () {
        FB.init({
            appId: '<?= $this->appId; ?>',
            status: <?= (isset($this->status) && $this->status ? 'true' : 'false'); ?>,
            xfbml: <?= (isset($this->xfbml) && $this->xfbml ? 'true' : 'false'); ?>,
            version: '<?= (isset($this->version) ? $this->version : ''); ?>'
        });
        <?= isset($this->fbAsynchInitHook) ? $this->fbAsynchInitHook : ''; ?>
    };

    (function (d, s, id) {
        var js, fjs = d.getElementsByTagName(s)[0];
        if (d.getElementById(id)) {
            return;
        }
        js = d.createElement(s);
        js.id = id;
        js.async = <?= (isset($this->async) && $this->async ? 'true' : 'false'); ?>;
        js.src = "//connect.facebook.net/<?= $this->locale; ?>/sdk.js";
        fjs.parentNode.insertBefore(js, fjs);
    }(document, 'script', 'facebook-jssdk'));
    -->
</script>
Use php short tags for echo
Use php short tags for echo
