/*global FB*/
Template.Challenge.events ({
	'click .button__challenge': function() {
		var currentUrl = Router.current().url;
		if (currentUrl.indexOf('http') === -1) {
			currentUrl = Meteor.absoluteUrl(currentUrl.substring(1)); //substring to remove the initial /
		}

		console.log('FB URL to share:', currentUrl);

		FB.ui({
			method: 'feed',
			//href: currentUrl, //share from current URL of the app
			link: currentUrl,
			caption: 'Reference Documentation',
			description: 'Lorem ipsum dolor sit amet, consectetur arum aliquam reprehenderit laudantium disti. Dicta.'
		}, function(response) {
			if (response && response.post_id) {
				console.log('Post was published.');
			} else {
				console.log('Post was not published.');
			}
		});
	},


});

Template.Challenge.helpers ({
	'inMapMaster': function() {
		var isHidden = '';
		if (Session.get('showGame')) {
			isHidden= 'hidden-smartphone';
		}
		return isHidden;
	}
});
@@ -310,16 +310,549 @@
 entUrl);
+%0A%09%09var description = %5B%0A%09%09%09'B%E1%BA%A1n kh%C3%A2m ph%E1%BB%A5c th%C3%A0nh t%C3%ADch ch%C6%A1i c%E1%BB%A7a m%C3%ACnh? V%E1%BA%ADy h%C3%A3y th%E1%BB%AD th%C3%A1ch b%E1%BA%A1n b%C3%A8 c%E1%BB%A7a m%C3%ACnh %C4%91%E1%BB%83 quy%C3%AAn %C4%91%C6%B0%E1%BB%A3c nhi%E1%BB%81u ti%E1%BB%81n h%C6%A1n cho c%C3%A1c em nh%E1%BB%8F.',%0A%09%09%09'B%E1%BA%A1n ngh%C4%A9 ch%E1%BA%B3ng ai c%C3%B3 th%E1%BB%83 ch%C6%A1i gi%E1%BB%8Fi h%C6%A1n m%C3%ACnh? H%C3%A3y th%C3%A1ch b%E1%BA%A1n b%C3%A8 c%C3%B9ng ch%C6%A1i %C4%91%E1%BB%83 ch%E1%BB%A9ng t%E1%BB%8F n%C3%A0o!',%0A%09%09%09'%C4%90%C3%A2y c%C3%B3 ph%E1%BA%A3i th%C3%A0nh t%C3%ADch t%E1%BB%91t nh%E1%BA%A5t ch%C6%B0a? M%E1%BB%9Di b%E1%BA%A1n b%C3%A8 c%C3%B9ng ch%C6%A1i %C4%91%E1%BB%83 xem nh%C3%A9.',%0A%09%09%09'Kh%C3%B4ng ai c%C3%B3 th%E1%BB%83 gi%E1%BA%A3i nhanh h%C6%A1n b%E1%BA%A1n? Th%C3%A1ch b%E1%BA%A1n b%C3%A8 n%C3%A0o!'%0A%09%09%5D;%0A%0A%09%09var index = Math.floor((Math.random() * 4));%0A%0A%09%09var mapId = Router.current().params.mapId;%0A%09%09var caption ='Th%E1%BB%AD th%C3%A1ch '+mapId+' - B%C3%A1nh Ch%C6%B0ng Xanh';
 %0A%0A%09%09FB.u
@@ -970,33 +970,15 @@
 on: 
-'Reference Documenta
+cap
 tion
-'
 ,%0A%09%09
@@ -995,101 +995,26 @@
 on: 
-'Lorem ipsum dolor sit amet, consectetur arum aliquam reprehenderit laudantium disti. Dicta.'
+description%5Bindex%5D
 %0A%09%09%7D

fix method changllen friends