private static function getFB() { if (self::$fb) { return self::$fb; } $fb = new Facebook_Facebook(array('appId' => 'APP_ID', 'secret' => 'APP_SECRET')); self::$fb = $fb; return self::$fb; }
print htmlspecialchars(print_r($user_profile, true)); ?> </pre> <?php } else { ?> <fb:login-button></fb:login-button> <?php } ?> <div id="fb-root"></div> <script> window.fbAsyncInit = function() { FB.init({ appId: '<?php echo Non_Zend_Facebook::getAppID(); ?> ', cookie: true, xfbml: true, oauth: true }); FB.Event.subscribe('auth.login', function(response) { window.location.reload(); }); FB.Event.subscribe('auth.logout', function(response) { window.location.reload(); }); }; (function() { var e = document.createElement('script'); e.async = true;