Christoffer Niska committed c43ecb2

Fixed a few things in the demo Facebook integration.

Comments (0)

Files changed (2)


 	// Application-level parameters
-		'appTitle'=>'Yii-Bootstrap - Bringing together the Yii PHP framework and Twitter\'s Bootstrap.',
+		'appTitle'=>'Yii-Bootstrap - Bringing together the Yii PHP framework and Twitter\'s Bootstrap',
 		'appDescription'=>'Yii-Bootstrap is an extension for Yii that focuses on server-side that allows you to easily use Bootstrap in your Yii applications.',


 <!doctype html>
-<html xmlns:fb="" xml:lang="en" lang="en">
 <head prefix="og: <?php echo Yii::app()->fb->appNamespace; ?>:<?php echo Yii::app()->fb->appNamespace; ?>#">
 	<?php Yii::app()->controller->widget('ext.seo.widgets.SeoHead', array(
 <body id="top">
 <div id="fb-root"></div>
-<script type="text/javascript">
-	(function(d, s, id) {
-		var js, fjs = d.getElementsByTagName(s)[0];
-		if (d.getElementById(id)) return;
-		js = d.createElement(s); = id;
-		js.src = "//";
-		fjs.parentNode.insertBefore(js, fjs);
-	}(document, 'script', 'facebook-jssdk'));
+	window.fbAsyncInit = function() {
+		FB.init({
+			appId      : <?php echo Yii::app()->fb->appID; ?>, // App ID
+			status     : true, // check login status
+			cookie     : true, // enable cookies to allow the server to access the session
+			xfbml      : true  // parse XFBML
+		});
+		// Additional initialization code here
+	};
+	// Load the SDK Asynchronously
+	(function(d){
+		var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
+		js = d.createElement('script'); = id; js.async = true;
+		js.src = "//";
+		d.getElementsByTagName('head')[0].appendChild(js);
+	}(document));
 <?php $this->widget('BootNavbar',array(
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.