diff --git a/config/settings.yml b/config/settings.yml
index a783573..4098a07 100644
--- a/config/settings.yml
+++ b/config/settings.yml
@@ -36,3 +36,4 @@ app-name: lebd
username: dani
repository: https://gitlab.com/00dani/lebd
#analytics: UA-YOURCODE
+fb-app-id: "_env:FB_APP_ID:142105433189339"
diff --git a/src/Settings.hs b/src/Settings.hs
index 0212013..c6de01a 100644
--- a/src/Settings.hs
+++ b/src/Settings.hs
@@ -62,6 +62,9 @@ data AppSettings = AppSettings
-- Example app-specific configuration values.
, appAnalytics :: Maybe Text
-- ^ Google Analytics code
+ , appFacebookId :: Maybe Int
+ -- ^ Facebook app ID, also used for analytics.
+
, siteTitle :: Text
-- ^ Site-wide title.
, siteUsername :: Text
@@ -96,6 +99,7 @@ instance FromJSON AppSettings where
appSkipCombining <- o .:? "skip-combining" .!= defaultDev
appAnalytics <- o .:? "analytics"
+ appFacebookId <- o .:? "fb-app-id"
siteTitle <- o .: "title"
siteUsername <- o .: "username"
diff --git a/templates/default-layout-wrapper.hamlet b/templates/default-layout-wrapper.hamlet
index 68e2bbc..fcdf97e 100644
--- a/templates/default-layout-wrapper.hamlet
+++ b/templates/default-layout-wrapper.hamlet
@@ -9,6 +9,8 @@ $doctype 5
$maybe route <- mcurrentRoute
+ $maybe fb <- appFacebookId $ appSettings master
+