
function fb_score_publish(zuser,score,gnm,descrp,medsrc,link){
	var title ='';
	if(score == undefined){
		title = zuser + ' played ' + gnm;
	}else{
		title = zuser + ' scored ' + score + ' points in ' + gnm;
	}

	var publish = {
	  method: 'stream.publish',
  	  display: 'popup',
	  attachment: {
		name: title,		
		description: (descrp),
		href: link,
		media: [
			{
				type: 'image',
				href: link,
				src: medsrc
			}
		]
	  },
	  action_links: [
		{ text: 'Play ' + gnm, href: link }
	  ],
	  user_prompt_message: 'Brag about it!'
	};

	FB.ui(publish, function(response) {
		 if (response && response.post_id) {
		   //alert('Post was published.');
		 } else {
		   //alert('Post was not published.');
		 }
	});

}
