
var FacebookApp = new function() {
	var apiId = 'b3c881040bc59d17a7f93784a839fd0b';
	return {
		setName : function(textboxId) {
			if (FB.Connect.get_status().result == FB.ConnectState.connected) {
				var uid = FB.Connect.get_loggedInUser();
				api.users_getInfo(uid,'name',function(result, exception) {
							document.getElementById(textboxId).value = result[0].name;
						});
			}
		},
		getApi : function () {
			return FB.ApiClient(apiId);
		}
	};
};