/*
function update_user_box() {
	document.getElementById("fb_connect").innerHTML = '<fb:profile-pic uid="loggedinuser" size="square" facebook-logo="true"></fb:profile-pic><fb:name uid="loggedinuser" useyou="false" linked="true"></fb:name>';
	var d = document.getElementById("live_stream");

	if (d != null) {
		d.innerHTML = '<fb:live-stream event_app_id="320955067112" xid="YOUR_EVENT_XID" width="300" height="500"></fb:live-stream>';
	}
}

<fb:login-button v="2" size="medium" onlogin="window.location.reload(true);">Connect with Facebook</fb:login-button>
*/


function update_user_box() {
  var user_box = document.getElementById("user");
  // add in some XFBML. note that we set useyou=false so it doesn't display "you"
  user_box.innerHTML = "<span>" + "<fb:profile-pic uid=loggedinuser facebook-logo=true></fb:profile-pic>" + "Welcome, <fb:name uid=loggedinuser useyou=false></fb:name>. You are signed in with your Facebook account." + "</span>";
  // because this is XFBML, we need to tell Facebook to re-process the document
  FB.XFBML.Host.parseDomTree();

/*
  var widget_div = document.getElementById("profile_pics");
  FB.ensureInit(function () {
	 FB.Facebook.apiClient.friends_get(null, function(result) {
		var markup = "";
		var num_friends = result ? Math.min(10, result.length) : 0;
		if (num_friends > 0) {
		   for (var i=0; i<num_friends; i++) {
			  markup += '<fb:profile-pic size="square" uid="' + result[i] + '" facebook-logo="true"></fb:profile-pic> <fb:name uid="' + result[i] + '" useyou="false"></fb:name><br>';
		   }
		}
		widget_div.innerHTML = markup;
		FB.XFBML.Host.parseDomElement(widget_div);
	 });
  });
  
*/  
  
}



function callPublish(msg, attachment, action_link) {
 FB.ensureInit(function () {
   FB.Connect.streamPublish(msg, attachment, action_link);
 });
}
